Warcraft III resources & community, 2003–2006 · archived

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

5 posts
#1

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

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
#2
I don't have WE in front of me..But i'll do my best!

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

[code]CONDITION[/code]
-none-

[b]ACTION[/b]

IF THEN ELSE
-Condition
If last created unit is HERO equal to true
Then do - [b]Action[/b] - Add last created unit to "variable"
#3

cool

great that works.
thanks. :)

DeadDogNoGoWoof
#4
Always a pleasure to help a fellow map maker :wink:
#5
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.