A_RaiseDead(actor corpse, int flags)
Moderator: GZDoom Developers
- 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)
Like A_RaiseMaster but for any ZScript actor pointer.
Re: A_RaiseDead(actor corpse, int flags)
Potential DIY? I mean, you can use <actor pointer>.Thing_Raise(0) - unless a dedicated function would be more robust.
- 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)
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.
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.
- 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)
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.
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.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: A_RaiseDead(actor corpse, int flags)
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.
Edit: Oops! Looks like I can't select the closed feature suggestions forum as a move-to target.
Re: A_RaiseDead(actor corpse, int flags)
You should be able to, now.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: A_RaiseDead(actor corpse, int flags)
Does this gracefully handle player resurrection?
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: A_RaiseDead(actor corpse, int flags)
This doesn't work on players.
https://zdoom.org/wiki/RaiseActor
https://zdoom.org/wiki/RaiseActor
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: A_RaiseDead(actor corpse, int flags)
There will never be player resurrection without some ridiculous reworking of the system Nash. Sorry.
- 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)
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).
Re: A_RaiseDead(actor corpse, int flags)
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).
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).
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_RaiseDead(actor corpse, int flags)
Please stop thinking like that.Rachael wrote: That is - if Graf is okay with that idea.