• 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.

Replacing unit by items.. HELP PLZ

Status
Not open for further replies.
Level 3
Joined
Jun 30, 2005
Messages
46
I am trying to make a trigger that will replace the unit when bought an item.

Example..

Unit "a" bought an item ("z")... If buying unit is unit "a" then replace unit "a" with unit "b"...

Everytime i try doing this trigger every unit that bought this item get replace.. lol.

Help me pleasee!!
 
Level 17
Joined
Jan 21, 2007
Messages
2,014
Eh? not sure what the error was but i think i may solve it.

You want a specific unit-type to become another unit-type when buying a specific item? But the problem is that all units gets replaced when they are buying the item?

Events
A unit aquires an iem
Conditions
Unit-type of (Hero manipulating item) is equal to (the unit type)
Actions
Set variable (Replaced) to (Hero manipulating item)
Set variable (TempPoint) to (position of (Replaced)
Remove (Hero manipulating item) from the game.
Create 1 (new unit-type) for owner of (Replaced) at (TempPoint)
 
Status
Not open for further replies.
Top