Bugging Code

SpaceBar

New Member
Reaction score
16
Trigger:
  • Check Humans
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in humans and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Number of living Human units owned by (Picked player)) Equal to 0
                  • (Number of living DarknLight units owned by (Picked player)) Equal to 0
                  • (Number of living Mother_Demon units owned by (Picked player)) Equal to 0
                  • (Number of living Mother_SpaceBar units owned by (Picked player)) Equal to 0
                  • (Number of living NightWishing units owned by (Picked player)) Equal to 0
                  • (Number of living eatmyknife units owned by (Picked player)) Equal to 0
            • Then - Actions
              • Sound - Play rock <gen>
              • Player Group - Pick every player in (All players) and do (Environment - Create Blight for (Picked player) across (Entire map))
              • Visibility - Disable fog of war
              • Visibility - Disable black mask
              • Environment - Set fog to style Linear, z-start 1000.00, z-end 8000.00, density 0.00 and color (100.00%, 0.00%, 0.00%)
              • Game - Display to (Player group((Picked player))) the text: The world is doomed...
              • Wait 120.00 seconds
              • Player Group - Pick every player in humans and do (Game - Defeat (Picked player) with the message: Defeat!)
              • Player Group - Pick every player in vampires and do (Game - Victory (Picked player) (Show dialogs, Show scores))
            • Else - Actions


Well what happens is that when ONE of those die, it calls the game to end (after 120 seconds) what i'm trying to do is that when there are NONE of those units alive to call the game over not when one dies.. Any ideas?

~Regards Space
 

tooltiperror

Super Moderator
Reaction score
231
Well what happens is that when ONE of those die, it calls the game to end (after 120 seconds) what i'm trying to do is that when there are NONE of those units alive to call the game over not when one dies.. Any ideas?

~Regards Space

I believe it is because the And-if-or.

Try shortening it? Can't think of how to do it right, I think you need to remove the If somehow, or maybe add one condition to the If.
 

jomik

New Member
Reaction score
17
You have to set it to be "And All conditions are true". But then it'll show defeat as soon as one player doesn't have any units in the groups.

You can have a boolean, which is set to true, then check if players have any of the units alive, if they do, set it to false, if in the end of the trigger this still is true, then run the defeat stuff.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top