[ZScript] Global Footsteps Proof-of-Concept

Post your example zscripts/ACS scripts/etc here.

[ZScript] Global Footsteps Proof-of-Concept

Postby DenisBelmondo » Sun Apr 29, 2018 12:14 am

One of my favorite light mods for ZDoom has to be The Zombie Killer's GDCC-ACS-based footsteps mod and its ability to provide the effect regardless of player class. I decided to implement something similar in ZScript as a learning experiment. It's far from the greatest code I've written and it doesn't have CVars, but it does the job. It's multiplayer-friendly and SR40/50 aware, meaning that the delay between footstep sounds are clamped. Like The Zombie Killer's implementation, this one runs from what is essentially a key/value thing in a language lump. However, it is not compatible with the definitions in The Zombie Killer's mod. This mod also features a type of "shuffling" that you can hear when walking down stairs of a certain elevation and at a certain speed, an effect that I quite enjoy personally.

Along the way, I had a working prototype that grabbed the LeftStepSound and RightStepSound from the flat's terrain definition, but if you were playing with a mod that had an existing terrain lump it would break compatibility. At some point in the future if I refactor this, I would also like to add CVars, a clause that decreases the delay if you're playing with a faster player class, and landing sounds.

If you include this in a mod, I hope you don't mind just mentioning me in the credits.



Download

Credits: Valve Software (wood plank sounds), Turtle Rock Studios (the rest of the sounds), The Zombie Killer (the idea even wrt to the implementation like speed-based sound volume)
User avatar
DenisBelmondo
now is time to the i386 heart on fire
 
Joined: 06 Jun 2008
Location: Two-Key Return

Return to Script Library

Who is online

Users browsing this forum: No registered users and 2 guests