A way to give people lives in Survival through ACS
A way to give people lives in Survival through ACS
Does one such way exist? Would be very handy.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
RE: A way to give people lives in Survival through ACS
No. (Unless something has been implemented very recently.)
Your choices are to:
Create a hack of Cooperative Gamemode that allows you to select which players can play and which cannot with scripts
Use Survival gamemode with a high number of lives, and basically when you want someone to stop playing force-spec them.
Your choices are to:
Create a hack of Cooperative Gamemode that allows you to select which players can play and which cannot with scripts
Use Survival gamemode with a high number of lives, and basically when you want someone to stop playing force-spec them.
Last edited by Llewellyn on Fri Oct 05, 2012 6:14 pm, edited 1 time in total.
- Torr Samaho
- Lead Developer
- Posts: 1543
- Joined: Fri May 25, 2012 6:03 pm
- Location: Germany
RE: A way to give people lives in Survival through ACS
No, but we can discuss adding an ACS function for this.
RE: A way to give people lives in Survival through ACS
I've made a tracker request for this.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
- Torr Samaho
- Lead Developer
- Posts: 1543
- Joined: Fri May 25, 2012 6:03 pm
- Location: Germany
RE: A way to give people lives in Survival through ACS
Ok, then let's discuss the technicalities in there.
RE: A way to give people lives in Survival through ACS
I haven't seen the source but I'd imagine that making lives manipulatable via ACS shouldn't be too difficult. I mean lives already have their own hardcoded variable (which is changed via sv_maxlives), right?
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

-
Theshooter7
- Forum Regular
- Posts: 262
- Joined: Wed Jun 06, 2012 2:15 am
RE: A way to give people lives in Survival through ACS
Looks easy enough, from my quick browse of the source. Just make the ACS function call PLAYER_SetLivesLeft() with a pointer to the desired player, and add one (and in fact, this is how the Survival/LMS code seems to handle it, when queuing the player for respawn). I'd suggest the ACS command use a player ID to obtain which player. So, it'd look like this:
Alternatively, we could extend it into SetPlayerProperty(), but that might conflict with any future ZDoom changes, so I don't know what your call on that would be.
The good news, is it looks like PLAYER_SetLivesLeft() handles all the c/s interaction related to it automatically, so at least there won't be extra work in that regard.
Code: Select all
SetPlayerLives(int playernum, int lives);The good news, is it looks like PLAYER_SetLivesLeft() handles all the c/s interaction related to it automatically, so at least there won't be extra work in that regard.
Just for some information, sv_maxlives is only used when setting up the game (initializing the game rules etc.). Actively altering the current lives of a player requires changing the variable stored in the player class. Interestingly, this means one could add lives to players that go over the set value for sv_maxlives. I suppose one might want to make sure that any changes in lives through ACS does not go over the server variable maximum (a simple comparison when calling PLAYER_SetLivesLeft()), but that's a dev's decision of course. :)Ænima wrote: I haven't seen the source but I'd imagine that making lives manipulatable via ACS shouldn't be too difficult. I mean lives already have their own hardcoded variable (which is changed via sv_maxlives), right?
Last edited by Theshooter7 on Fri Oct 05, 2012 7:34 pm, edited 1 time in total.
RE: A way to give people lives in Survival through ACS
I would rather have it as an ActorProperty myself... to be accessed with GetActorProperty/SetActorProperty, with your current implementation how do you count how many lives you have left? (Also you could give actors lives and set them etc.)Theshooter7 wrote:Code: Select all
SetPlayerLives(int playernum, int lives);
Last edited by Llewellyn on Fri Oct 05, 2012 7:47 pm, edited 1 time in total.
RE: A way to give people lives in Survival through ACS
Well my suggestion was to have functions retrieve life values and let you set them as well so really, once you have one of them you should get the other to have better usage.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===
