Friendly Arch-Vile that resurrects player

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
superscrungus
Posts: 10
Joined: Thu Sep 27, 2018 9:30 pm

Friendly Arch-Vile that resurrects player

Post by superscrungus »

Hiyo. Looking to add a friendly Arch-Vile to a wad I'm making, but I'm wondering how to make it actively seek out the player to resurrect them. I'm assuming the +FRIENDLY flag in decorate and AllowRespawn in mapinfo isn't enough to get it to do so. If it's even possible, of course.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Friendly Arch-Vile that resurrects player

Post by Graf Zahl »

AV's cannot resurrect players. The engine simply does not allow that.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Friendly Arch-Vile that resurrects player

Post by Arctangent »

Out of curiosity, what are the main obstacles with that? I imagine the big one is the fact that a player can stop inhabiting a PlayerPawn, leaving it without a controller, but I imagine that can be worked around in more specific cases with quirks of their own design ( i.e. by making the vile ignore "empty" pawns, or having pawns that can be overtaken by AI when empty but alive ). Is there anything else that's a red flag?
User avatar
Ravick
Posts: 2003
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: Friendly Arch-Vile that resurrects player

Post by Ravick »

I guess it'd be hacky as kludge's hell, but I'd try to achiev that by making monsters take health from player instead of inflicting damage. The player does not actually die when it happens, so my guess would be that it could be disguised as a real death by ACS and then disgued again as a resurrection when the modded arch gives player more health. I'm not sure, however, if the player will become to normal when receiving health again.

Also, monsters seems to not target zero health players, so I'd need to use more kludges as spawing a fake actor at player's death, so the archvile may target this actor to actually walk until "dead" player location.

[edit] It'd need to be tested, however. I'm not sure it'd work at all.
Post Reply

Return to “Scripting”