• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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