Game Defeat Lives = 0

  • Thread starter Thread starter RaptorX9
  • Start date Start date
R

RaptorX9

Guest
Hay eh,

So I got the leaderboard working so when a unit enters a area it - 1 from its score and shows it on leaderbard.

Now, I'm having a hard time figuring out how to make it so when Lives = 0 its defeats all the players.

Can any one help me?




X9
 
Add an If/Then/Else loop on the end of the trigger?

something like:

wait 0.2 seconds

If Lives=0
Then Defeat player (owner of(triggering unit)) with message "You have run out of lives!"

Else Do Nothing.


I will edit this post when ive made the if/then/else loop in the editor.

Edit:

Code:
  Events
    Conditions
    Actions
        Wait 0.10 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Lives Equal to 0
            Then - Actions
                Game - Defeat (Owner of (Triggering unit)) with the message: You have run out of...
            Else - Actions
                Do nothing

For the Condition, it is under Boolean\Integer Comparison.
 
NoxMortus said:
Add an If/Then/Else loop on the end of the trigger?

something like:

wait 0.2 seconds

If Lives=0
Then Defeat player (owner of(triggering unit)) with message "You have run out of lives!"

Else Do Nothing.


I will edit this post when ive made the if/then/else loop in the editor.

Thank you but I may of got another problem, what if the Level Varibal count goes to -1 then -2 and so on? (Another words when a mass of creeps enter the end of the maze region and the Lives count goes below 0...) wil it still defeat the player?
 
It will Defeat the player, but If you want it to stay at 0 Lives even if it's meant to be on -2 or whatever, then add this to the 'Then' Actions:

Code:
Trigger - Turn off (This trigger)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1

The Helper Discord

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top