HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Events - Unable to use custom variables

12-30-2002, 11:21 PM#1
MrDoomMaster
In the event called "Unit - Specific Unit Event", I am unable to use my Unit variables i have created. Any way i can use them in events?
12-31-2002, 02:33 AM#2
Ari
No. This has something to do with the fact that the event logic has to exist prior to the existance of any unit variables. That didn't even make sense to me, and will most likely make even less to you, but this is a hard-coded thing. So instead of refering to variables, you have to be a bit sly about the whole thing, and use some other combination of events and conditions to apply to your particular situation. If you're still having trouble, why don't you reply with your particulars. I'm sure I or somebody else will be able to give you a way of getting around the issue.
12-31-2002, 12:36 PM#3
SuperIKI
You must register the event with custom text after the unit is created and the variable is set.
12-31-2002, 07:51 PM#4
CBWhiz
SuperIKI - That would still refer to the initial unit if you reset the variable, i think.

The best work around is:
EVENTS:
Player owned unit event - player 1 does x
Player owned unit event - player 2 does x
Player owned unit event - player 3 does x
Player owned unit event - player (up to 12) does x
CONDITION:
triggering unit = your unit variable
01-01-2003, 08:12 PM#5
SuperIKI
Quote:
Originally posted by CBWhiz
SuperIKI - That would still refer to the initial unit if you reset the variable, i think.

The best work around is:
EVENTS:
Player owned unit event - player 1 does x
Player owned unit event - player 2 does x
Player owned unit event - player 3 does x
Player owned unit event - player (up to 12) does x
CONDITION:
triggering unit = your unit variable

You are right. But not all specific 'unit events' have equivalent 'player owned unit events'.
If you can do it with a player owned unit event: Do it.