[ZScript] Global Footsteps Proof-of-Concept

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.
Post Reply
User avatar
DenisBelmondo
Posts: 379
Joined: Fri Jun 06, 2008 6:26 pm
Location: Two-Key Return
Contact:

[ZScript] Global Footsteps Proof-of-Concept

Post by DenisBelmondo »

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)
Post Reply

Return to “Script Library”