[Added] A_RaiseDead(actor corpse, int flags)

Moderator: GZDoom Developers

A_RaiseDead(actor corpse, int flags)

Postby Matt » Mon Apr 23, 2018 12:27 am

Like A_RaiseMaster but for any ZScript actor pointer.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: A_RaiseDead(actor corpse, int flags)

Postby Mikk- » Mon Apr 23, 2018 10:42 am

Potential DIY? I mean, you can use <actor pointer>.Thing_Raise(0) - unless a dedicated function would be more robust.
User avatar
Mikk-
yooooooooooo
 
Joined: 30 Jun 2009
Location: Somewhere off Kanagawa
Discord: Mikk0451#3922

Re: A_RaiseDead(actor corpse, int flags)

Postby Matt » Mon Apr 23, 2018 1:43 pm

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
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: A_RaiseDead(actor corpse, int flags)

Postby Matt » Wed May 23, 2018 12:13 am

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.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: A_RaiseDead(actor corpse, int flags)

Postby Blue Shadow » Sun Jul 28, 2019 4:55 am

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
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: A_RaiseDead(actor corpse, int flags)

Postby Rachael » Sun Jul 28, 2019 5:12 am

You should be able to, now.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: A_RaiseDead(actor corpse, int flags)

Postby Blue Shadow » Sun Jul 28, 2019 5:33 am

Thanks.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: A_RaiseDead(actor corpse, int flags)

Postby Nash » Sun Jul 28, 2019 8:41 am

Does this gracefully handle player resurrection?
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: A_RaiseDead(actor corpse, int flags)

Postby Blue Shadow » Sun Jul 28, 2019 8:54 am

This doesn't work on players.
https://zdoom.org/wiki/RaiseActor
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: A_RaiseDead(actor corpse, int flags)

Postby Major Cooke » Sun Jul 28, 2019 9:45 am

There will never be player resurrection without some ridiculous reworking of the system Nash. Sorry. :(
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: A_RaiseDead(actor corpse, int flags)

Postby Xeotroid » Sun Jul 28, 2019 10:05 am

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
Xeotroid
 
Joined: 23 Jun 2012
Location: Czech Rep.

Re: A_RaiseDead(actor corpse, int flags)

Postby Rachael » Sun Jul 28, 2019 12:11 pm

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
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: A_RaiseDead(actor corpse, int flags)

Postby Graf Zahl » Sun Jul 28, 2019 12:28 pm

Rachael wrote: That is - if Graf is okay with that idea.


Please stop thinking like that.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest