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

[Trigger] Unit Upgrade

Status
Not open for further replies.
Level 27
Joined
Sep 24, 2006
Messages
4,981
I tried to make a trigger that if you pick up an item your unit drops all his items.. a region is moved to your unit and your unit is replaced with a stronger unit and then all the items in the replaced region will be given to you so you won't lose your items while upgrading into a stronger unit...

However... it doesn't work... anyone has an idea for a trigger like this?
 
Level 11
Joined
Dec 11, 2007
Messages
888
  • Trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Item x
    • Actions
      • Set TempItem[1] = (Item-type of (Item carried by (Triggering unit) in slot 1))
      • Set TempItem[2] = (Item-type of (Item carried by (Triggering unit) in slot 2))
      • Set TempItem[3] = (Item-type of (Item carried by (Triggering unit) in slot 3))
      • Set TempItem[4] = (Item-type of (Item carried by (Triggering unit) in slot 4))
      • Set TempItem[5] = (Item-type of (Item carried by (Triggering unit) in slot 5))
      • Set TempItem[6] = (Item-type of (Item carried by (Triggering unit) in slot 6))
      • Item - Remove (Item carried by (Triggering unit) in slot 1)
      • Item - Remove (Item carried by (Triggering unit) in slot 2)
      • Item - Remove (Item carried by (Triggering unit) in slot 3)
      • Item - Remove (Item carried by (Triggering unit) in slot 4)
      • Item - Remove (Item carried by (Triggering unit) in slot 5)
      • Item - Remove (Item carried by (Triggering unit) in slot 6)
      • Unit - Replace (Triggering unit) with another unit using The new unit's default life and mana
      • Hero - Create TempItem[1] and give it to (Last replaced unit)
      • Hero - Create TempItem[2] and give it to (Last replaced unit)
      • Hero - Create TempItem[3] and give it to (Last replaced unit)
      • Hero - Create TempItem[4] and give it to (Last replaced unit)
      • Hero - Create TempItem[5] and give it to (Last replaced unit)
      • Hero - Create TempItem[6] and give it to (Last replaced unit)
i didnt understand at what you want to use a region
 
Level 9
Joined
Oct 17, 2007
Messages
547
I wouldn't do that. there is a simple and faster way of doing it, use the replace unit action. The new unit will have everything the old one does, and it will also be at the same lv i believe.
 
Status
Not open for further replies.
Top