How do yu make a unit variable recognize the unit as a hero?

Status
Not open for further replies.
My map(cinematic) has a created unit that uses spells. its spells are on the object editor and are learned in the trigger editor. since it is a created unit, i use a variable for it. but when I try to make the variable learn spells/use them or set level, the variable doesnt respond in any way.
Does anyone know how to make a unit variable recognizee the unit as a hero?

Please help,
DeadDogNoGoWoof
 
Level 8
Joined
Jul 3, 2004
Messages
404
I don't have WE in front of me..But i'll do my best!

Code:
[b]EVENT[/b]
Unit - Create "unit X"

[code]CONDITION
-none-

ACTION

IF THEN ELSE
-Condition
If last created unit is HERO equal to true
Then do - Action - Add last created unit to "variable"[/code]
 
Level 3
Joined
Aug 5, 2004
Messages
47
Like lonley wolf said, you can also make a variable that is a unit. Its starting value is none. Once you make that unit you can set it to that variable and refer to that hero even after a new one is put in.
 
Status
Not open for further replies.
Top