• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] OR condition

Level 9
Joined
Mar 26, 2020
Messages
209
im trying to make a region like those rpg maps where your going to spawn units randomly in the region...what i need is how do i do the multiple unit type using OR since OR only supports two, but using OR inside OR will be nested and might broke my trigger

im thinking it should look like this
  • Conditions
    • (Spawn Forest <gen> contains (Position of (Triggering unit))) Equal to True
    • (((Unit-type of (Triggering unit)) Equal to Footman) or ((Unit-type of (Triggering unit)) Equal to Knight)) or (((Unit-type of (Triggering unit)) Equal to Rifleman) or ((Unit-type of (Triggering unit)) Equal to Mortar Team))
 
You can use "Or (multiple)" version of condition and put several single conditions in it for clarity.

Otherwise, I don't see issues with nesting them (but I don't know specific limits to it, as they may exist in both versions).
ohhh this one?
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
i didn't know that is a thing, it was also on the last category, no wonder i didn't see there is this option
 
Back
Top