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

Preventing Area Spawn

Status
Not open for further replies.
Level 5
Joined
Dec 11, 2010
Messages
101
Okay, so this trigger that me and a friend from here made works nice and all. What this trigger does is that when ESC is pressed, it creates 10 randomly placed groups of 1 unit except for the area which is specified. My question is, how can I change this to have multiple non-spawn areas?

  • Wave Template Test
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Spawn_Integer Less than or equal to 9
        • Then - Actions
          • Set Temp_Point = (Random point in Whole Map <gen>)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dont Spawn Enemies <gen> contains Temp_Point) Equal to True
            • Then - Actions
              • Custom script: call RemoveLocation (udg_Temp_Point)
              • Trigger - Run (This trigger) (checking conditions)
            • Else - Actions
              • Unit - Create 1 Footman for Player 1 (Red) at Temp_Point facing Default building facing degrees
              • Set Spawn_Integer = (Spawn_Integer + 1)
              • Custom script: call RemoveLocation (udg_Temp_Point)
              • Trigger - Run (This trigger) (checking conditions)
        • Else - Actions
          • Set Spawn_Integer = 0
 
Level 21
Joined
Aug 13, 2011
Messages
739
In the conditions, look for "Or, Multiple Conditions". Add your other regions in under that. Then it should look something like this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Dont Spawn Enemies <gen> contains TempPoint) Equal to True
          • (Dont Spawn Enemies 2 <gen> contains TempPoint) Equal to True
          • (Dont Spawn Enemies 3 <gen> contains TempPoint) Equal to True
    • Then - Actions
Another method would be to just make sure the point is not in the regions which will use the "All" conditions instead of "Or" and reverse your then actions/else actions:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Dont Spawn Enemies <gen> contains TempPoint) Equal to False
      • (Dont Spawn Enemies 2 <gen> contains TempPoint) Equal to False
      • (Dont Spawn Enemies 3 <gen> contains TempPoint) Equal to False
    • Then - Actions
 
Status
Not open for further replies.
Top