Is there a way to silently kill the player?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Is there a way to silently kill the player?
Is there a way to silently kill the player? (in acs preferably) I mean silent, both as in no screaming death, just silence, and no red flash on the screen. I need it so it is not apparent at all to the player that the player character died. So yeah, is this possible at all?
Re: Is there a way to silently kill the player?
Since the player's view falls to the ground when they die, and I don't think you have any control over that, my first thought would be maybe some way you can spawn a camera in the location and direction they were facing, and instantly switch to the camera's view upon death.
Maybe something like that might work?
Maybe something like that might work?
- 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: Is there a way to silently kill the player?
Isn't there some way to lower a player's health without "damaging" the player? (like taking inventory or something) If so, you could lower the player's health to 1 and then do 1 damage so the flash would be barely noticeable.
As for silence... first thing that comes to mind is a special death and pain state that don't call A_PlayerScream and have that 1-damage thing do the sort of damage that would call those states.
As for silence... first thing that comes to mind is a special death and pain state that don't call A_PlayerScream and have that 1-damage thing do the sort of damage that would call those states.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Is there a way to silently kill the player?
You could set their Health with [wiki]SetActorProperty[/wiki].Vaecrius wrote:Isn't there some way to lower a player's health without "damaging" the player?
Right.Vaecrius wrote:As for silence... first thing that comes to mind is a special death and pain state that don't call A_PlayerScream and have that 1-damage thing do the sort of damage that would call those states.

Re: Is there a way to silently kill the player?
Thanks for the help, this should work.
Unfortunately, the player doesn't seem to be dying when I use Thing_Damage2... It's probably my fault, no idea what I'm doing wrong. ACS code here:
A few things are redacted because this is not my project (I'm only helping), and I wouldn't want to spoil anything.

Code: Select all
script 199 (int arg0) // [REDACTED]
{
SetPlayerProperty (1, 1, 4);
if (arg0 == 0)
{
hudmessagebold (s:"[REDACTED]"; 2, 0, CR_GOLD, 0.5, 0.6, 1.0, 0.03, 1.0);
hudmessagebold (s:"[REDACTED]"; 2, 103, CR_RED, 0.5, 0.3, 4.0, 0.00, 1.0);
}
if (arg0 == 1)
{
hudmessagebold (s:"[REDACTED]"; 2, 0, CR_GOLD, 0.5, 0.6, 1.0, 0.03, 1.0);
hudmessagebold (s:"[REDACTED]"; 2, 103, CR_RED, 0.5, 0.3, 4.0, 0.00, 1.0);
}
delay(70);
//FadeTo(0.0, 0.0, 0.0, 1.0, 2.0);
ACS_Terminate(121, 0);
ACS_Terminate(131, 0);
ACS_Terminate(122, 0);
ACS_Terminate(132, 0);
ACS_Terminate(123, 0);
ACS_Terminate(133, 0);
delay(70);
SetActorProperty (240, APROP_Health, 0);
Thing_Damage2 (240, 50, "MissionFailiure");
}
- 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: Is there a way to silently kill the player?
What's activating the script? If it's the player you might as well set the tid in Thing_Damage2 to zero (assuming it works that way - I've never done anything like this with ACS, I just have the player shoot an invisible projectile that immediately explodes).
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Is there a way to silently kill the player?
Why would you set Health to zero and then try to deal 50 damage? Try a 1 for both.Sodahollic wrote:Code: Select all
SetActorProperty (240, APROP_Health, 0); Thing_Damage2 (240, 50, "MissionFailiure");
Re: Is there a way to silently kill the player?
EDIT: A more direct way of doing what I would want is if the player pressed the use key, it would load the most recent save. (just like if you pressed the use key when dead)
The arg0 is dependent on which of the two monsters that activate the script dies. (just a different message, that's it)
None of the ACS_Terminate actions should be affecting this, those only deal with stuff like music and ambient sounds.
@Vaecrius: The script is activated when a particular monster dies. The player's tid is 240. I could try the projectile idea, and see if it works.
Even though it's the monster that is activating the script, the player is still affected by the SetActorProperty, but seemingly not the Thing_Damage2.
@NeutralStunner: I set the health to 0, because there is a regeneration script that causes the player to immediately start regenerating if health is at least 1. I set the damage to 50 because I was frustrated and was trying to see if setting the damage any higher would have any effect. (and it still didn't) I don't intend on keeping it that way, I'm setting it back to 1.
The arg0 is dependent on which of the two monsters that activate the script dies. (just a different message, that's it)
None of the ACS_Terminate actions should be affecting this, those only deal with stuff like music and ambient sounds.
@Vaecrius: The script is activated when a particular monster dies. The player's tid is 240. I could try the projectile idea, and see if it works.
Even though it's the monster that is activating the script, the player is still affected by the SetActorProperty, but seemingly not the Thing_Damage2.
@NeutralStunner: I set the health to 0, because there is a regeneration script that causes the player to immediately start regenerating if health is at least 1. I set the damage to 50 because I was frustrated and was trying to see if setting the damage any higher would have any effect. (and it still didn't) I don't intend on keeping it that way, I'm setting it back to 1.
Last edited by Sodaholic on Sun Feb 06, 2011 3:43 pm, edited 1 time in total.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Is there a way to silently kill the player?
I'd put a few tics of delay on the regen script before it actually starts returning Health - It should fail anyway if the Player is dead, assuming you're using [wiki]HealThing[/wiki].Sodahollic wrote:I set the health to 0, because there is a regeneration script that causes the player to immediately start regenerating if health is at least 1.
Re: Is there a way to silently kill the player?
As I said, it's not my mod, and I really don't want to touch the regen script. It does fail when the player is dead, and 1 health is not dead.
Does anyone know why the hell Thing_Damage2 is refusing to work?
Does anyone know why the hell Thing_Damage2 is refusing to work?
