• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Important question PLZ ANSWER

Status
Not open for further replies.
Level 4
Joined
Feb 11, 2006
Messages
44
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!
 
Level 4
Joined
Feb 11, 2006
Messages
44
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
 

Ki

Ki

Level 7
Joined
Aug 20, 2005
Messages
258
Create a variable called "grunt" as a unit variable type.

help3dh.png
 
Level 4
Joined
Feb 11, 2006
Messages
44
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
 

Ki

Ki

Level 7
Joined
Aug 20, 2005
Messages
258
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.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
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
 
Status
Not open for further replies.
Top