A_RaiseDead(actor corpse, int flags)

Moderator: GZDoom Developers

Post Reply
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

A_RaiseDead(actor corpse, int flags)

Post by Matt »

Like A_RaiseMaster but for any ZScript actor pointer.
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm
Location: Somewhere off Kanagawa

Re: A_RaiseDead(actor corpse, int flags)

Post by Mikk- »

Potential DIY? I mean, you can use <actor pointer>.Thing_Raise(0) - unless a dedicated function would be more robust.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_RaiseDead(actor corpse, int flags)

Post by Matt »

Won't work in ZScript, or at least without some circumlocution I can't remember off the top of my head.

EDIT: Temporarily setting a TID for the pointer. Which would require backing up the pointer's current TID, resulting in about the same number of lines of code as temporarily setting a master.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_RaiseDead(actor corpse, int flags)

Post by Matt »

So I just had to fix a really screwy bug that would have been totally avoidable had I not had to temporarily set an actor's master.

Meanwhile, trying to do the same thing with Thing_Raise lets me do this with one less line (since I can say "Thing_Raise(pointer.tid)", but friendliness cannot be transferred.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: A_RaiseDead(actor corpse, int flags)

Post by Blue Shadow »

Was added in 3.7.0 as RaiseActor().

Edit: Oops! Looks like I can't select the closed feature suggestions forum as a move-to target.
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: A_RaiseDead(actor corpse, int flags)

Post by Rachael »

You should be able to, now.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: A_RaiseDead(actor corpse, int flags)

Post by Blue Shadow »

Thanks.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: A_RaiseDead(actor corpse, int flags)

Post by Nash »

Does this gracefully handle player resurrection?
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: A_RaiseDead(actor corpse, int flags)

Post by Blue Shadow »

This doesn't work on players.
https://zdoom.org/wiki/RaiseActor
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: A_RaiseDead(actor corpse, int flags)

Post by Major Cooke »

There will never be player resurrection without some ridiculous reworking of the system Nash. Sorry. :(
User avatar
Xeotroid
Posts: 436
Joined: Sat Jun 23, 2012 7:44 am
Graphics Processor: nVidia with Vulkan support
Location: Czech Rep.

Re: A_RaiseDead(actor corpse, int flags)

Post by Xeotroid »

With that in mind, how hacky is the resurrect command, then? I only know that it can't be used when the player is decapitated (Hexen).
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: A_RaiseDead(actor corpse, int flags)

Post by Rachael »

It's really hacky. I think a far better way to do player resurrection would've been to just call G_DoReborn with the flags allowing the player to spawn in the same spot, instead of the way it currently operates. G_DoReborn gives the player a fresh new body and leaves their old one behind as decoration.

In fact, it wouldn't be much trouble probably to split off the body creation and reassignment to a new function which could be exposed to the console, and possibly to ACS and ZScript. That is - if Graf is okay with that idea. In this idea, I would of course force G_DoReborn to call the new function and the new function would have flags based on what it wants to do (i.e. where to spawn the new player, etc).
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_RaiseDead(actor corpse, int flags)

Post by Graf Zahl »

Rachael wrote: That is - if Graf is okay with that idea.
Please stop thinking like that.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”