[Code] Footsteps - v5 released!

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: [Code] Footsteps - v2 released!

Post by The Zombie Killer »

@TheDoomGuy
That can easily be implemented by editing the string that contains what sounds to use in the ACS.
Last edited by The Zombie Killer on Thu Jun 26, 2014 6:51 am, edited 2 times in total.
Skrell
Posts: 351
Joined: Mon Mar 25, 2013 11:47 am

Re: [Code] Footsteps - v2 released!

Post by Skrell »

I just came across this WAD and i'm very excited to try it when I get home from work! My problem is when playing COOP i can't tell if my teammate is around me or if they've wandered off. Will this WAD allow me to hear their footsteps in addition to mine? Also, where can i learn more about ACS scripts? I'm not familiar at all with modding doom but am interested.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: [Code] Footsteps - v2 released!

Post by The Zombie Killer »

@Skrell
Yes, you will be able to hear all players' footsteps.
You can learn about ACS here
Last edited by The Zombie Killer on Thu Jun 26, 2014 6:51 am, edited 1 time in total.
User avatar
HellBlade64
Posts: 44
Joined: Tue May 13, 2014 3:00 pm

Re: [Code] Footsteps - v2 released!

Post by HellBlade64 »

Could you post a step-by-step on how to make footstep sounds from scratch with just one sound? I'm working on a simple mod and I have the sound clips, I just can't configure them properly.
User avatar
Ral22
Posts: 531
Joined: Sun Sep 05, 2010 12:09 pm
Preferred Pronouns: He/Him
Location: The Fortress of Dr. Radiaki
Contact:

Re: [Code] Footsteps - v2 released!

Post by Ral22 »

I discovered a neat feature using this Footstep system (Though I was using v3 for this, it could still be done with v2 until The Zombie Killer releases the latest one publicly). It can be used to make a system where enemies can be activated based on the emitted volume of the player's footsteps; the louder the step (The faster you are going), the larger radius you emit that alerts monsters.

If you take the variable "stepVolume" and place it outside of the script (So it can be recognized by other scripts), then make a new script that looks like this:

Code: Select all

Script "SneakValue" (Void)
{
int sneakVolume = stepVolume + 1; //Required, if not given the extra "+1" it would return a value of "0", which means infinite range when used with "A_AlertMonsters"
SetResultValue(sneakValue);
}
If you wish to alter the radius of the sound emitted, you alter the "sneakVolume" variable (If you want the range to be wider, you would, say, multiply it by 1.5 or 2). By default marine speed, I got return values of ~170 when running full speed; walking returns about ~80.
Finally, alter your player class with this Decorate action during it's See state:

Code: Select all

A_AlertMonsters(CallACS("SneakValue",0,0,0,0))
That should do it. While stealth is not necessarily a common feature in Doom mods, this makes for an easy way to implement the idea should you wish to go that route in your mods.
User avatar
twinkieman93
Posts: 1075
Joined: Fri Aug 10, 2007 11:13 pm

Re: [Code] Footsteps - v2 released!

Post by twinkieman93 »

Could you not also make it check for the player's height i.e. if they are crouching or not, and lower the volume even more? Oooooh...
User avatar
Ral22
Posts: 531
Joined: Sun Sep 05, 2010 12:09 pm
Preferred Pronouns: He/Him
Location: The Fortress of Dr. Radiaki
Contact:

Re: [Code] Footsteps - v2 released!

Post by Ral22 »

Actually, because the footstep system plays the sound volume based on player speed (The faster you move, the louder the sound plays) it indirectly takes this into account. The sound effect, and thus A_AlertMonsters radius is at it's smallest when you crouch and don't have run on (That's when your player moves the slowest). In fact, the radius of the emitted alert is so small that you would bump into the monster before it would "hear" your footsteps.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: [Code] Footsteps - v2 released!

Post by The Zombie Killer »

Ral22 wrote:I discovered a neat feature using this Footstep system (Though I was using v3 for this, it could still be done with v2 until The Zombie Killer releases the latest one publicly). It can be used to make a system where enemies can be activated based on the emitted volume of the player's footsteps; the louder the step (The faster you are going), the larger radius you emit that alerts monsters.

If you take the variable "stepVolume" and place it outside of the script (So it can be recognized by other scripts), then make a new script that looks like this:

Code: Select all

Script "SneakValue" (Void)
{
int sneakVolume = stepVolume + 1; //Required, if not given the extra "+1" it would return a value of "0", which means infinite range when used with "A_AlertMonsters"
SetResultValue(sneakValue);
}
If you wish to alter the radius of the sound emitted, you alter the "sneakVolume" variable (If you want the range to be wider, you would, say, multiply it by 1.5 or 2). By default marine speed, I got return values of ~170 when running full speed; walking returns about ~80.
Finally, alter your player class with this Decorate action during it's See state:

Code: Select all

A_AlertMonsters(CallACS("SneakValue",0,0,0,0))
That should do it. While stealth is not necessarily a common feature in Doom mods, this makes for an easy way to implement the idea should you wish to go that route in your mods.
Ironically enough, that's actually something I implemented in a project I was using the footstep code in, I just never thought to add it into the main library.
Also, I'm gonna release v3 in a couple minutes, just gotta edit the thread and upload the files.
HellBlade64 wrote:Could you post a step-by-step on how to make footstep sounds from scratch with just one sound? I'm working on a simple mod and I have the sound clips, I just can't configure them properly.
With v3 you can just go into LANGUAGE and delete all of the sounds that are set up there except for STEP_DEFAULT, then you just go into SNDINFO and set that sound you want to use as the sound for "step/default"
Skrell
Posts: 351
Joined: Mon Mar 25, 2013 11:47 am

Re: [Code] Footsteps - v3 released!

Post by Skrell »

I tried using this pk3 with BrutalDoomSE and the dhtp addon; any idea why i didn't hear any footsteps?
User avatar
Hellser
Global Moderator
Posts: 2706
Joined: Sun Jun 25, 2006 4:43 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Citadel Station

Re: [Code] Footsteps - v3 released!

Post by Hellser »

If you payed any, if much attention, this is just

Code: Select all

[/b]. I doubt he has this setup for use as a mod - rather, setup for use as an example. If you want to get this working with BrutalDoomSE, then take up Decorate and ACS and learn how to get this working.
User avatar
NachtIntellect
Posts: 305
Joined: Wed Feb 29, 2012 2:10 pm
Location: Bienenstock, Germany

Re: [Code] Footsteps - v3 released!

Post by NachtIntellect »

Would these work in Zandronum? I am asking this because I have no way of testing it.
Skrell
Posts: 351
Joined: Mon Mar 25, 2013 11:47 am

Re: [Code] Footsteps - v3 released!

Post by Skrell »

Whiteace wrote:Would these work in Zandronum? I am asking this because I have no way of testing it.
If you build this into a workable mod i'll gladly try it in Zandro for you :)
User avatar
Agitatio
Posts: 240
Joined: Mon Sep 05, 2011 10:07 am
Graphics Processor: nVidia with Vulkan support

Re: [Code] Footsteps - v3 released!

Post by Agitatio »

Hellser wrote:I doubt he has this setup for use as a mod - rather, setup for use as an example. If you want to get this working with BrutalDoomSE, then take up Decorate and ACS and learn how to get this working.
He actually did and I have it in autoload now. Had no issues so far. Worked with Brutal Doom too.
Skrell
Posts: 351
Joined: Mon Mar 25, 2013 11:47 am

Re: [Code] Footsteps - v3 released!

Post by Skrell »

Grigori wrote:
Hellser wrote:I doubt he has this setup for use as a mod - rather, setup for use as an example. If you want to get this working with BrutalDoomSE, then take up Decorate and ACS and learn how to get this working.
He actually did and I have it in autoload now. Had no issues so far. Worked with Brutal Doom too.
Wow this is great news! Can you please provide detailed instructions as to what you did to get it to work?

ie.) 1. GZDOOM/Zandro?
2. Load order?
3. What other, if any, addons did you load along with it? (ie. would a texture pack break foostepsv3?)
4. Brutal Doom SE/EE/Vanilla ?
User avatar
Agitatio
Posts: 240
Joined: Mon Sep 05, 2011 10:07 am
Graphics Processor: nVidia with Vulkan support

Re: [Code] Footsteps - v3 released!

Post by Agitatio »

Skrell wrote:Wow this is great news! Can you please provide detailed instructions as to what you did to get it to work?

ie.) 1. GZDOOM/Zandro?
2. Load order?
3. What other, if any, addons did you load along with it? (ie. would a texture pack break foostepsv3?)
4. Brutal Doom SE/EE/Vanilla ?
GZDoom. I just have it in autoload, so it loads before everything I load manually. I played SE and Vanilla with it. Just download and try it yourself.
Post Reply

Return to “Script Library”