Page 1 of 1
A_RaiseDead(actor corpse, int flags)
Posted: Sun Apr 22, 2018 11:27 pm
by Matt
Like A_RaiseMaster but for any ZScript actor pointer.
Re: A_RaiseDead(actor corpse, int flags)
Posted: Mon Apr 23, 2018 9:42 am
by Mikk-
Potential DIY? I mean, you can use <actor pointer>.Thing_Raise(0) - unless a dedicated function would be more robust.
Re: A_RaiseDead(actor corpse, int flags)
Posted: Mon Apr 23, 2018 12:43 pm
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.
Re: A_RaiseDead(actor corpse, int flags)
Posted: Tue May 22, 2018 11:13 pm
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.
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 3:55 am
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.
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 4:12 am
by Rachael
You should be able to, now.
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 4:33 am
by Blue Shadow
Thanks.
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 7:41 am
by Nash
Does this gracefully handle player resurrection?
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 7:54 am
by Blue Shadow
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 8:45 am
by Major Cooke
There will never be player resurrection without some ridiculous reworking of the system Nash. Sorry.
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 9:05 am
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).
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 11:11 am
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).
Re: A_RaiseDead(actor corpse, int flags)
Posted: Sun Jul 28, 2019 11:28 am
by Graf Zahl
Rachael wrote: That is - if Graf is okay with that idea.
Please stop thinking like that.