Having a little logic problem [Solved]
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
Might be able to fix it with a simple "If self.Time > 0.1 then" condition added to the collide with ground rule.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline this would just make it trigger after 0.1 seconds,whatever i put in as soon as my feet on ground is true it will play, and my feet on ground needs to always be true when the actor collides with the ground.
Whatever method you are using to get the actor off the ground should have a gate that allows the feet on the floor sound to work . . .
So:
When Actor jump is true change AAA to true
If actor lands on ground and AAA is true - then play sound.
@Socks Thanks , it worked and thanks @Armelline
Clever.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS