• 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] Very Complex in my eyes HELP PLEASE

Status
Not open for further replies.
Level 2
Joined
Oct 20, 2007
Messages
9
Okay. So I'm working on this map called "Vampirism Death." I have a little extra in the game that is if you have an Item a killed unit drops, and you go to a region, the hero with the item is removed and replaced with another one. Any help?
 
Level 2
Joined
Oct 20, 2007
Messages
9
I've been working with this since I got out of school.. And I haven't figured it out, (By looking at the forums or by self experimentation..) Still in need of help.
 
Level 2
Joined
Oct 20, 2007
Messages
9
  • Events-
  • Unit - A unit enters *region* <gen>
  • Conditions-
  • *item* Equal to (Item carried by *hero* in slot 1)
  • Actions
  • Unit - Replace (Triggering unit) with a *hero2* using The old unit's relative life and mana
Sorry for double post was trying to edit ><
 
Level 18
Joined
May 27, 2007
Messages
1,689
Alright, if the only way to acquire this item is to kill a certain unit and get that item, then the trigger should look like this so you are searching every slot rather than the first one
  • Boom
    • Events
      • Unit - A unit enters (*Your Region*)
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item carried by (Triggering Unit) in slot (Integer A)) Equal to (*Your Item*)
            • Then - Actions
              • Unit - Replace (Triggering unit) with a *Your Unit* using The old unit's relative life and mana
            • Else - Actions
 
Status
Not open for further replies.
Top