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