Warcraft III resources & community, 2003–2006 · archived

Important question PLZ ANSWER

7 posts
#1

Important question PLZ ANSWER

for my map, i have this one main hero, wehn i press the up arrow key he morphs into a dragon but when i press the down key, i want him to morph back to human, how do i do this? I alrady figured out how to morph into, but not out. PLZ HELP!
#2
tell us how you're doing the morph into, then we could find a solution that fits in with it...
#3

hehe

well... I just do this for one of my characters...

event: player1 presses the "up" arrow key

conditions: none

actions: Unit- replace(for example(Kinght)) with a

(grunt) with new unit's max health and mana.

AND TO TURN BACK INTO KNIGHT I DO THIS...

event: player1 presses the "down" arrow key

conditions: none

action: Unit- Replace(last replaced unit) with a unit

type knight.

BUT THAT DOESN'T TURN THE ORC INTO THE KINGHT THAT I

WANT, MY GUY IS A CUSTOM HERO AND IT ONLY DOES UNIT

TYPES. PLZ HELP
#5

OMG

See, that doesnt work either because...

It starts out replacing a certain unit and when you want to replace the already morphed unit back into that certain unit, it replaces with just a knight and you can't morph again
#6
You didn't include that.

I think to do what you want to do, you have to create 2 variables that have a unit-type variable type. Set it so that a variable called "knight"=UnitType of (Knight) and the same with the grunt. Then just substitute the specific knight unit with the variable and it should work.
#7
won't it work too if you just create 1 unit variable called "thereplacedunit" and make the following triggers?

Trigger 1:
Events: player - player 1 presses the up arrow key
Actions: Unit - Replace <thereplacedunit> with a grunt using the new unit's max life and mana
Variable - set thereplacedunit = last replaced unit

Trigger 2:
Events: player - player 1 presses the down arrow key
Actions: Unit - Replace <thereplacedunit> with a knight using the new unit's max life and mana
Variable - set thereplacedunit = last replaced unit

Trigger 3: Map initialization
events: map initialization
Actions: Variable - set thereplacedunit = knight 0027