Bugged Victory Trigger

SnowCrow

New Member
Reaction score
7
Code:
Player 1 Win
    Events
        Time - Every 0.10 seconds of game time
    Conditions
        Player1Score Greater than or equal to 25
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Make (Picked unit) Invulnerable)
        Unit - Pause all units
        Trigger - Run Player 1 Win <gen> (checking conditions)
        Trigger - Turn off Woo 1 <gen>
        Trigger - Turn off Woo 2 <gen>
        Trigger - Turn off Woo 3 <gen>
        Trigger - Turn off Woo 4 <gen>
        Trigger - Turn off Woo 5 <gen>
        Trigger - Turn off Woo 6 <gen>
        Trigger - Turn off Woo 7 <gen>
        Trigger - Turn off Woo 8 <gen>
        Trigger - Turn off Woo 9 <gen>
        Trigger - Turn off Woo 10 <gen>
        Trigger - Turn off Woo 11 <gen>
        Trigger - Turn off Woo 12 <gen>
        Trigger - Turn off (This trigger)

Woo <gen> is a respawn trigger for every player.

Code:
Player 1 Victory
    Events
    Conditions
    Actions
        Sound - Play GoodJob <gen>
        Game - Display to (All players) the text: ((Name of Player 1 (Red)) +  has achieved victory and is now the ruler of the town!
        Wait 2.00 seconds
        Sound - Play War2IntroMusic <gen>
        Wait 60.00 seconds
        Game - Victory Player 1 (Red) (Show dialogs, Show scores)
        Game - Defeat Player 2 (Blue) with the message: You failed to achie...
        Game - Defeat Player 3 (Teal) with the message: You failed to achie...
        Game - Defeat Player 4 (Purple) with the message: You failed to achie...
        Game - Defeat Player 5 (Yellow) with the message: You failed to achie...
        Game - Defeat Player 6 (Orange) with the message: You failed to achie...
        Game - Defeat Player 7 (Green) with the message: You failed to achie...
        Game - Defeat Player 8 (Pink) with the message: You failed to achie...
        Game - Defeat Player 9 (Gray) with the message: You failed to achie...
        Game - Defeat Player 10 (Light Blue) with the message: You failed to achie...
        Game - Defeat Player 11 (Dark Green) with the message: You failed to achie...
        Game - Defeat Player 12 (Brown) with the message: You failed to achie...
Now, when the Player1Score reaches 25, the game just tilts, then the whole WC crashes. I don't know whats wrong with this. Help?
 
S

Sunny_D

Guest
in your first trigger i guess:

Code:
Trigger - Run Player 1 [I]Win[/I] <gen> (checking conditions)

should be:

Code:
Trigger - Run Player 1 [B]Victory[/B] <gen> (checking conditions)

because otherwise you would say the same trigger it should run, but you turn it off the same time. i think that causes your crash...
 

SnowCrow

New Member
Reaction score
7
Lol...
I had 12 of those same triggers for each player, and 11 of them had the "run player VICTORY <gen>". I'm so stupid, didn't see that.
Well, thanks for quick answer!
 

Sooda

Diversity enchants
Reaction score
318
Using 0.10 second periodic event is sensless do people really care if they win 1 second later ? Your group leaks what causes after some time map freeze for sure. Better use 1 second and custom script to remove group leak. Store first all picked units into unit group variable then do your checks and destroy variable.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top