1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Preventing Area Spawn

Discussion in 'World Editor Help Zone' started by Impereal Gardian, Dec 9, 2014.

  1. Impereal Gardian

    Impereal Gardian

    Joined:
    Dec 11, 2010
    Messages:
    100
    Resources:
    0
    Resources:
    0
    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
     
  2. Tickles

    Tickles

    Joined:
    Aug 13, 2011
    Messages:
    663
    Resources:
    4
    Maps:
    4
    Resources:
    4
    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
     
  3. Impereal Gardian

    Impereal Gardian

    Joined:
    Dec 11, 2010
    Messages:
    100
    Resources:
    0
    Resources:
    0
    Thanks Tickles!