Page 1 of 1

[ACS] (Survival) ACS Excuting if the Last Player loses all lives (SEE THE NEXT PAGE)

Posted: Sat Aug 10, 2019 2:05 pm
by TaporGamingBugReport
So i don't know if i do if the last player lost all it's lives.

Anyone can help this?

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Sun Aug 11, 2019 7:23 pm
by Dusk
Wire up a death script and check whether 'GetPlayerLivesLeft' returns 0.

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Mon Aug 12, 2019 2:41 am
by TaporGamingBugReport
I test out with 3 bots. But only one player has lost all lives and they executed the script

Can i do to check players if alive? If all players died execute the script. Should i do?

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Sat Aug 17, 2019 11:15 am
by TaporGamingBugReport
Anyone?

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Sat Aug 17, 2019 3:29 pm
by TDRR
Count all players in the game and every time someone loses all lives add to a separate int (Possibly called something like DeadPlayers) and in the same death script check if DeadPlayers equals the player count.

You can get the player count by using PlayerCount().

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Sun Aug 18, 2019 11:00 am
by TaporGamingBugReport
Idk why i do this.

Full code?

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Sun Aug 18, 2019 5:35 pm
by TDRR

Code: Select all

int DeadPlayers; //This is a script-scope variable.

Script "Suvival_Death" DEATH
{
     if(PlayerIsSpectator(PlayerNumber()) == 2) //This checks if the player ran out of lives
     {
          DeadPlayers++;
     }
     if(DeadPlayers >= PlayerCount()) //This checks if all players are dead.
     {
          //do whatever you need to do here
     }
}
Actually Dusk was wrong, since GetPlayerLivesLeft returning 0 means the player has one life left. Unless of course this was changed and the wiki wasn't updated, but this method i used in the script works too.

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Mon Aug 19, 2019 7:30 am
by TaporGamingBugReport
It's not working

Fix?

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Tue Aug 20, 2019 1:26 am
by TaporGamingBugReport
Anyone?

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Tue Aug 20, 2019 2:55 pm
by TaporGamingBugReport
Oh it works. but...
Still buggy

Could you please to fix this?

[ACS] Re: (Survival) ACS Excuting if the Last Player loses all lives

Posted: Wed Aug 28, 2019 12:22 am
by TaporGamingBugReport
Anyone?