Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Help with a trigger

Discussion in 'Triggers & Scripts' started by Shiroaisu, Jan 21, 2010.

  1. Shiroaisu

    Shiroaisu

    Joined:
    Jul 17, 2008
    Messages:
    202
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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
     
  2. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Is that the whole trigger?
     
  3. Shiroaisu

    Shiroaisu

    Joined:
    Jul 17, 2008
    Messages:
    202
    Resources:
    1
    Maps:
    1
    Resources:
    1
    • 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 >.<
     
  4. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Looks fine to me. You could use "Game display String(NumberSpawns)" to check that.

    Lower the event interval to 1 second and test it. It really should work as far as I can tell.
     
  5. mattman111

    mattman111

    Joined:
    Jan 5, 2008
    Messages:
    146
    Resources:
    0
    Resources:
    0
    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
     
  6. Shiroaisu

    Shiroaisu

    Joined:
    Jul 17, 2008
    Messages:
    202
    Resources:
    1
    Maps:
    1
    Resources:
    1
    K, i found what the problem was, i was summoning abominations in other trigger and i was not changing the var... ty anyway maker and mattman111