• 🏆 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 problem

Status
Not open for further replies.
Level 2
Joined
Aug 26, 2010
Messages
18
Well I got this little problem you see ..

  • System Item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (Unit-type of Mercenary 0014 <gen>)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to (Item-type of Sack full of rocks 0047 <gen>)
        • Then - Actions
          • Unit - Replace (Triggering unit) with a (Unit-type of Mercenary Ranger 0224 <gen>) using The new unit's default life and mana
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of Stick 0227 <gen>)
            • Then - Actions
              • Unit - Replace (Triggering unit) with a (Unit-type of Mercenary Mage 0223 <gen>) using The new unit's default life and mana
            • Else - Actions
              • Do nothing
The upper one is working fine alone but as soon as I add the next one

  • System Item Drop
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Mercenary Ranger
          • (Item-type of (Item being manipulated)) Equal to (Item-type of Sack full of rocks 0047 <gen>)
        • Then - Actions
          • Unit - Replace (Triggering unit) with a Mercenary using The new unit's default life and mana
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Mercenary Mage
              • (Item-type of (Item being manipulated)) Equal to (Item-type of Stick 0227 <gen>)
            • Then - Actions
              • Unit - Replace (Triggering unit) with a (Unit-type of Mercenary 0014 <gen>) using The new unit's default life and mana
            • Else - Actions
              • Do nothing
I get a fatal error...
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
  • (Item-type of (Item being manipulated)) Equal to (Item-type of Sack full of rocks 0047 <gen>)
  • (Item-type of (Item being manipulated)) Equal to (Item-type of Stick 0227 <gen>)
  • Unit - Replace (Triggering unit) with a (Unit-type of Mercenary 0014 <gen>) using The new unit's default life and mana
If you are replacing this mercenary earlier in the trigger or in another trigger, referencing it will cause a fatal.

Rather use a unit type than a "unit type of unit".
 
Status
Not open for further replies.
Top