Problem with jumping and ducking
Zwire
Member, PRO Posts: 182
Hi there,
I made 2 touch controlls. A jump and duck control. Everything works accept that my player actor can still duck while jumping.
Anyone know how to block the duck touch command during jumping?
Comments
Make the rule for the duck include the condition: jump=false
Here is one way of doing it.....Demo
https://www.dropbox.com/s/grmkn3ybshp7gkq/jump duck .zip?dl=0
You can't jump and duck at same time.....
Socks, I made a condition attribute jump is false for the rule for the duck but it didnt work.
The player can still duck in mid air.
Thank you for the download but it isnt the same. The player in your download isnt jumping but just moving up en down. My player is jumping en able to do a duck animation/command in midair which I dont know how to turn off.
Any other ideas?
//
You must have a condition for when the player touches the ground right? So in the rule that allows the duck add the ground condition to it. So if the player is not touching the ground it can't duck. Watch my video on how rules work.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Yeah that sounds like its it! Where can I find the ground condition? I cant find it in the condition list.
Can I find it somewhere here: attribute: self.player.(position????)
Steady. It's seems complicated but it's easy to learn.
Sent pm
You have to create a ground condition.....
If player touches collides with floor
change attribute duck to true
otherwise:
Change attribute duck to false
So if player is touching the ground he can duck. As soon as he jumps he leaves the ground. He is no longer touching or colliding so the otherwise rule kicks in and turns duck to false....
Make sense?
Yes it worked. Many many thanks for your time and help man!
Good for you for figuring it out.