Author Topic: Simple Footstep Sounds Tutorial  (Read 1330 times)

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Simple Footstep Sounds Tutorial
« on: December 24, 2020, 11:26:49 AM »
I made this, just insert them on the corresponding CPs in your game:
Code: [Select]
//Create CP - Player Character
local var footstepBuffer = 0
Code: [Select]
//Looping CP - Player Character
if walking = true | running = true
     footstepBuffer + 1
else
     footstepBuffer = 0
if footstepBuffer < 20 & walking = true
     exit
if footstepBuffer < 10 & running = true
     exit
if walking = false & running = false
     exit
footstepBuffer = 0
upload sfx = 2 //Replace this with your sound id
Hope this helps :D

Note: Remember that exit command kills the cp process so you may put the code for the looping cp at the end of the cp or some code may not execute.
« Last Edit: December 24, 2020, 12:02:52 PM by Antikore »
Sorry because my English is not very good because I'm Spanish ;) :P

NinthNei

  • Level 1: Bizz
  • *
  • Posts: 14
    • View Profile
Re: Simple Footstep Sounds Tutorial
« Reply #1 on: July 22, 2021, 03:06:16 PM »
Thank you for making this, just tried it and it works great!

Would it be at all possible to make a different sound that plays after and then loops like the first one?

For instance, your sequence would be Footstep 1 sound for the right foot and then you could have a Footstep 2 sound for the left foot and then repeat the whole sequence from the beginning?
This catgirl is sadly on the last of her nine lives...
Time to make it count!

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Simple Footstep Sounds Tutorial
« Reply #2 on: July 23, 2021, 06:57:43 AM »
Thank you for making this, just tried it and it works great!

Would it be at all possible to make a different sound that plays after and then loops like the first one?

For instance, your sequence would be Footstep 1 sound for the right foot and then you could have a Footstep 2 sound for the left foot and then repeat the whole sequence from the beginning?
Yeah technically is possible
Sorry because my English is not very good because I'm Spanish ;) :P