Having a little logic problem [Solved]

IceboxIcebox Member Posts: 1,485
edited October 2015 in Working with GS (Mac)

Hello guys , my issue is regarding a platformer game , I have a sound playing every time the player lands on ground , so when my feet on ground is true , play landing sound.

It works pretty well , but im having an issue of the landing sound playing when i start the level , the problem is that the hero actor is already on the ground , so the landing sound plays automatically once at the start of every level. I am trying to figure out a way to make it trigger the sound rule only after i jump and land on ground or when i fall on the ground, but i cant figure out a good way to do it.

These are my two rules

Rule 1

If actor collides with ground
change game.myfeetonground to true
Otherwise change game.myfeetonground to false

Rule 2

If game.myfeetonground is true
play landing sound

Thanks

Comments

Sign In or Register to comment.