Checking lives count in ACS?

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Cutman
 
Posts: 66
Joined: Mon Jun 04, 2012 2:25 pm
Contact:

Checking lives count in ACS?

#1

Post by Cutman » Thu Dec 27, 2012 7:01 am

Is there any functionality to check how many lives a player has via ACS (using sv_maxlives in survival)?

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Checking lives count in ACS?

#2

Post by Watermelon » Thu Dec 27, 2012 7:04 am

Sadly none that I know of, there's two ways you could do this:
- Monitor it with a death script
- Edit the binary to allow you access to the number

I figure you'd index the player lives at the beginning for everyone with a serverside GetCvar("sv_maxlives"); and deaths subtract from this. If someone leaves they would be set to 0 with a disconnect script.

There may be an ACS function for it
Last edited by Watermelon on Thu Dec 27, 2012 7:04 am, edited 1 time in total.

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: Checking lives count in ACS?

#3

Post by Torr Samaho » Thu Dec 27, 2012 12:38 pm

Watermelon wrote: - Monitor it with a death script
That's pretty difficult since not all deaths cost a life. For instance you don't lose a life if you are spawn telefragged.
Watermelon wrote: There may be an ACS function for it
Currently there is no such function, but feel free to request it (if there is no request for it yet).

User avatar
Ivan
Addicted to Zandronum
Posts: 2228
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Checking lives count in ACS?

#4

Post by Ivan » Thu Dec 27, 2012 12:49 pm

Torr Samaho wrote:
Watermelon wrote: - Monitor it with a death script
That's pretty difficult since not all deaths cost a life. For instance you don't lose a life if you are spawn telefragged.
Watermelon wrote: There may be an ACS function for it
Currently there is no such function, but feel free to request it (if there is no request for it yet).
Spawn telefrags have a different damagetype AFAIK, you can give an item on death to the player when that happens and check for that in ACS, if so, terminate. I've done a similar thing before.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Catastrophe
Retired Staff / Community Team Member
Posts: 2568
Joined: Sat Jun 02, 2012 2:44 am

RE: Checking lives count in ACS?

#5

Post by Catastrophe » Thu Dec 27, 2012 6:07 pm

You could force unbock players and stop telefragging at the spawn altogether. Then watermelon's getcvar suggestion would work.

User avatar
Ivan
Addicted to Zandronum
Posts: 2228
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: Checking lives count in ACS?

#6

Post by Ivan » Thu Dec 27, 2012 7:18 pm

Catastrophe wrote: You could force unbock players...
BOCK BOCK BOCK!
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

Catastrophe
Retired Staff / Community Team Member
Posts: 2568
Joined: Sat Jun 02, 2012 2:44 am

RE: Checking lives count in ACS?

#7

Post by Catastrophe » Thu Dec 27, 2012 11:04 pm

Ok, maybe temporarily enable unblock players, and teleport all the players based on tid to a new spawn and then disable unblock players.

Post Reply