A_Resurrect & ResurrectActor

Moderator: GZDoom Developers

Post Reply
AnotherLurker
Posts: 36
Joined: Wed May 24, 2017 10:58 am

A_Resurrect & ResurrectActor

Post by AnotherLurker »

DECORATE version - A_Resurrect
ACS version - ResurrectActor

Resurrect the calling actor. This function would be meant for players, for monsters, A_Respawn already exists.

There could be optional parameters for things such as enabling/disabling telefog, resetting/keeping stats, or being combined
with A_Respawn's ability to teleport the actor to their spawn point/playerstart, but such parameters are entirely optional since
a person can simply add those in after the fact when using said function with a state or script.

The code responsible for instantly reviving a player does exist within the console command "Resurrect". Implementing this code in the form of a function
would successfully allow a player actor to be resurrected without the use of a work-around.
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: A_Resurrect & ResurrectActor

Post by Rachael »

As long as it is done right, it might be doable, but I would trust Graf's opinion over my own in this matter.

Nevertheless, the engine does allow for player respawning internally, and does so through the G_DoReborn() function. That might be the best possible vector to go about this.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: A_Resurrect & ResurrectActor

Post by Blue Shadow »

Just to point it out; what about Resurrect()? It's already available in ZScript.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: A_Resurrect & ResurrectActor

Post by Arctangent »

Blue Shadow wrote:Just to point it out; what about Resurrect()? It's already available in ZScript.
Huh. Had no idea that resurrection triggered RESPAWN scripts.
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: A_Resurrect & ResurrectActor

Post by Rachael »

Huh. I did not know about that. Even further proven by the exported native: https://github.com/coelckers/gzdoom/blo ... r.cpp#L698

I'd still like to wait for Graf before I feel comfortable doing anything with this thread, though - I have a feeling he knows more about this particular subject than I do.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: A_Resurrect & ResurrectActor

Post by Graf Zahl »

Most of what is requested here already exists in the form of Thing_Raise / Actor.Revive for monsters and PlayerInfo.Resurrect for players.
But it makes zero sense to create a function that can do either - especially for ACS. And if it is really needed in ZScript it can be built from the existing functionality already so I really see no point adding more redundancy here. Never forget that anything that gets in will forever have to stay in,

And reading the other thread which got locked, let me just add: We are not here to jump through your hoops. If you cannot figure out how to program what you need yourself, you can ask another modder for help. And if you request a new core feature, please make sure that it actually provides something new that is of real use. What I see here is just an attempt to shortcut your work.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”