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

Help with a trigger

Status
Not open for further replies.
Level 6
Joined
Jul 17, 2008
Messages
185
hi there...

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • NumberSpawns Less than 2
    • Then - Actions
      • Unit - Create 5 Abomination for Player 4 (Purple) at (Center of Jail <gen>) facing Default building facing degrees
      • Game - Display to (All players) the text: Another 5 Abominati...
      • Game - Display to (All players) the text: A disaster occured.
      • Set NumberSpawns = (NumberSpawns + 1)
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NumberSpawns Less than 4
        • Then - Actions
          • Unit - Create 5 Abomination for Player 11 (Dark Green) at (Center of Jail <gen>) facing Default building facing degrees
          • Game - Display to (All players) the text: Another 5 Abominati...
          • Game - Display to (All players) the text: A disaster occured.
          • Set NumberSpawns = (NumberSpawns + 1)
        • Else - Actions
          • Game - Display to (All players) the text: A disaster occured.
What it was supose to do: it was supose to spawn 10 abominations for player 4 and then 10 for player 11.

What it does: it is failing at checking the var and allways spawn for player 4.. what am i doing wrong??

help pls
 
Level 6
Joined
Jul 17, 2008
Messages
185
  • Spawn Hard
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 20, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Goblin Land Mine for Player 4 (Purple) at (Random point in (Playable map area)) facing Default building facing degrees
      • Unit Group - Pick every unit in (Units of type Goblin Land Mine) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NumberSpawns Less than 2
        • Then - Actions
          • Unit - Create 5 Abomination for Player 4 (Purple) at (Center of Jail <gen>) facing Default building facing degrees
          • Game - Display to (All players) the text: Another 5 Abominati...
          • Game - Display to (All players) the text: A disaster occured.
          • Set NumberSpawns = (NumberSpawns + 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • NumberSpawns Less than 4
            • Then - Actions
              • Unit - Create 5 Abomination for Player 11 (Dark Green) at (Center of Jail <gen>) facing Default building facing degrees
              • Game - Display to (All players) the text: Another 5 Abominati...
              • Game - Display to (All players) the text: A disaster occured.
              • Set NumberSpawns = (NumberSpawns + 1)
            • Else - Actions
              • Game - Display to (All players) the text: A disaster occured.
... sory... i feel stupid now >.<
 
Level 5
Joined
Jan 5, 2008
Messages
145
umm there is nothing wrong with this trigger i just tested it and it works fine
  • Untitled Trigger 001
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SpawnNumber Less than 2
        • Then - Actions
          • Unit - Create 5 Footman for Player 4 (Purple) at (Center of (Playable map area)) facing Default building facing degrees
          • Game - Display to (All players) the text: yada yada yada
          • Game - Display to (All players) the text: yada yada yada
          • Set SpawnNumber = (SpawnNumber + 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SpawnNumber Less than 4
            • Then - Actions
              • Unit - Create 5 Footman for Player 11 (Dark Green) at (Center of (Playable map area)) facing Default building facing degrees
              • Game - Display to (All players) the text: yada yada yada
              • Game - Display to (All players) the text: yada yada yada
              • Set SpawnNumber = (SpawnNumber + 1)
            • Else - Actions
              • Game - Display to (All players) the text: Blah Blah
it must be something else in the trigger causing this is not work
 
Status
Not open for further replies.
Top