Equiping Hero Question -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 13 years ago

I'm using the Warcraft Editor from RoC. I am trying to make a map that will replace your heroes unit with another one, if you pick up a certain item. Example would be, you start with a peasant with an inventory, he picks up a custom item such as a sword, and then becomes a footman holding the item. When i do a specefic unit even it works, but only once, which defeats the purpose. When I use player-owned unit events and make all of the functions for a triggering unit, to avoid being to specefic because it only works once, the game will crash when I go to pick up an item that causes the change of units. Does anyone know how to set up the trigger so the unit will change when it picks up certain items? Thank you.




Eleandor

No User title

50 XP

27th July 2004

0 Uploads

548 Posts

0 Threads

#2 13 years ago

One question. it has to be the same unit, which just changes from model, or does it has to be a peasant, turning into a footman




Dread_Knight

I don't spend enough time here

50 XP

9th August 2004

0 Uploads

30 Posts

0 Threads

#3 13 years ago

im not too sure but is there like a kill trigger, then when that activates you could use summit like a make unit trigger ( sry if theres no such thing, im not that good at world editor :) )




Guest

I didn't make it!

0 XP

 
#4 13 years ago

Yes, it would have to be a different unit. I wanted to make it so it was like the hero had actually equipped the sword, so I wanted them to have new stats. Dread Knight, I think what you are saying is possible, but using the replace unit trigger seems easier than killing, then respawning a new one. And I'm not sure if I could make the hero spawn were the old one was.




Eleandor

No User title

50 XP

27th July 2004

0 Uploads

548 Posts

0 Threads

#5 13 years ago

I think I have 2 possible ways for it. I fairly would use the first one, because of some possible other problems. but if you prefere the second one, you're the editor.

(use trigger editor) 1sth possibility Event: Unit - A unit owned by Player 1 (Red) Acquires an item Condition: ((Unit-type of (Triggering unit)) Equal to Peasant) and ((Item-type of (Last created item)) Equal to Sword) Action: Hero - Modify Strength of (Triggering unit): Add X Hero - Modify Agility of (Triggering unit): Add Y Hero - Modify Agility of (Triggering unit): Add Z hp/mana/... (not required...) Item - Remove (Picked item) And last action: I thought there was something like this. I still think there is, but I can't find it in my editor... maybe if you watch a little

2nd possibility Event and condition the same. Action: Unit - Replace (Triggering unit) with a Footman using The old unit's relative life and mana

Make sure that your peasant and footman are both heroes.




Guest

I didn't make it!

0 XP

 
#6 13 years ago

I know the second one wouldn't work, because it would only work once do to the "Equal to Peasant" condition. The first one could happen, but is there anyway I could change the model of the unit as well as his statistics?