I'm working on a map in which whenever the player falls in a deep hole you can hear the marine scream (like in hexen), but i would like to see the OUCH face, just at the instant he is falling (i don't think is cool watching his normal face when he's falling)
So i wanted to do this via script, and i think i'm getting it something like this:
script 33 open
{
MOD_FALLING
setmugshotstate("Ouch");
}
Obviously the use of MOD_FALLING is incorrect, so i was hoping you could guide me here xD
oh yeah... and i still listen to the classic sound of marine's death when he reaches the floor... is it possible that the player dies silently when he reaches the bottom?
Any help appreciated xD
mugshot use in means of death
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.
Re: mugshot use in means of death
MOD_Falling is used to set the damage type for a sector, i think what you want to do is use a script to see how high the player is above the ground, and check to see if this sector is a mod_falling sector, then set the mugshot to ouch. i'm not entirely sure, but that's where i'd start.
- Dark-Assassin
- Posts: 743
- Joined: Thu Mar 19, 2009 3:40 am
- Location: South Australia
Re: mugshot use in means of death
i think this can be done with a_jumpif and GetActorFloorZ, or something similar
- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: mugshot use in means of death
If you want an ACS script for checking all of that jumping, falling and standing stuff, try this. Modify as needed, of course.
Code: Select all
SCRIPT 253 ENTER
{
int zcheck_var1 = (GetActorZ(0) == GetActorFloorZ(0));
int zcheck_var3;
while(zcheck_var1 == zcheck_var3)
{
// TakeInventory("Action_JumpBob",1);
// TakeInventory("Action_FallBob",1);
print(s:"You are standing. Arr!");
zcheck_var3 = GetActorZ(0);
if(zcheck_var1 < zcheck_var3) //Jumping.
{
// TakeInventory("Action_FallBob",1);
// GiveInventory("Action_JumpBob",1);
print(s:"You are jumping. Woot.");
}
if(zcheck_var1 > zcheck_var3) //Falling.
{
// TakeInventory("Action_JumpBob",1);
// GiveInventory("Action_FallBob",1);
print(s:"You are falling. Wee.");
}
zcheck_var1 = zcheck_var3;
delay(1);
}
}Re: mugshot use in means of death
It occured to me a more simple way to achieve this thing i wanna do...
There's a really deep cliff in my map in which it's assured you will die due if you fall there, so i was thinking in putting a line at the edge of the cliff; that line will execute a script that will show the OUCH face...
I wrote it like this:
script 33 (void)
{
setmugshotstate("Ouch");
}
But then I get this error:
Line 209 in file "script.acs" ...
script.acs:209: Function setmugshotstate is used but not defined.
The ACS compiler did not compile your script.
So how can i define the setmugshotstate?
There's a really deep cliff in my map in which it's assured you will die due if you fall there, so i was thinking in putting a line at the edge of the cliff; that line will execute a script that will show the OUCH face...
I wrote it like this:
script 33 (void)
{
setmugshotstate("Ouch");
}
But then I get this error:
Line 209 in file "script.acs" ...
script.acs:209: Function setmugshotstate is used but not defined.
The ACS compiler did not compile your script.
So how can i define the setmugshotstate?
- Dark-Assassin
- Posts: 743
- Joined: Thu Mar 19, 2009 3:40 am
- Location: South Australia
Re: mugshot use in means of death
add #include zcommon.acs to the 1st line
or you have to define it
or you have to define it
Re: mugshot use in means of death
I've written already the zcommon.acs to the 1st line...
what I need is to define the setmugshotstate. (I'm not sure how, but i think is done via SBARINFO lump)
what I need is to define the setmugshotstate. (I'm not sure how, but i think is done via SBARINFO lump)
Re: mugshot use in means of death
Make sure you have updated your ACC compiler. It is a recent function after all.