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

OR functions make trigger not work

Status
Not open for further replies.
Level 3
Joined
Feb 27, 2011
Messages
39
This trigger works with just 1 or 2 conditions but not with OR conditions, what could cause that?
  • Replace trigger
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
      • ((Triggering unit) has an item of type Shadow Orb +1) Equal to True
      • ((Triggering unit) has an item of type Shadow Orb +2) Equal to True
      • ((Triggering unit) has an item of type Shadow Orb +3) Equal to True
      • ((Triggering unit) has an item of type Shadow Orb +4) Equal to True
      • ((Triggering unit) has an item of type Shadow Orb +5) Equal to True
      • ((Triggering unit) has an item of type Shadow Orb +6) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
      • ((Triggering unit) has an item of type Claws of Attack +15) Equal to True
      • ((Triggering unit) has an item of type Claws of Attack +3) Equal to True
      • ((Triggering unit) has an item of type Frostguard) Equal to True
      • ((Triggering unit) has an item of type Assassin's Blade) Equal to True
      • ((Triggering unit) has an item of type Sturdy War Axe) Equal to True
      • ((Triggering unit) has an item of type Rusty Mining Pick) Equal to True
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set UnitsItems[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A))
          • Hero - Drop the item from slot (Integer A) of (Triggering unit)
      • Unit - Replace (Triggering unit) with a Mountain King using The old unit's relative life and mana
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Give UnitsItems[(Integer A)] to (Last replaced unit)
Also it doesnt matter if there are less conditions under OR, it still doesnt work. What i want to achieve is that one of six conditions is true under both ORs at the same time.
 

Attachments

  • acqire item replace testmap.w3x
    13.4 KB · Views: 34
You have listed them UNDER the "Or" function. Drag them within it, because right now, they work as if they are placed under an "And" function.
It should look like this:
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • ((Triggering unit) is A structure) Equal to True
        • (Ability being cast) Equal to Animate Dead
You don't need the second "Or" by the way.
 
Level 3
Joined
Feb 27, 2011
Messages
39
Yes you are right, thanks.
Now there's the problem that it makes the game crash. Any ideas why?
Pharaoh_; said:
You don't need the second "Or" by the way.
Are you sure, if i want 2 conditions to be true at the same time?
 
Status
Not open for further replies.
Top