Announcement

Collapse
No announcement yet.

Prevent crouching in air?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Prevent crouching in air?

    Hi! Me again!

    I've hit a bizarre snag.

    I'm trying to set up a system so that the user controlled character can jump a little higher if jumping from a crouch.

    When I got a friend to play test this and he found that he could make the character "fly" by mashing the crouch and jump buttons.

    I've tried to solve it so that this trick can't be exploited, by implementing logic that prevents crouching while in the air, however I haven't had any luck preventing it so-far.

    Click image for larger version

Name:	Logic1.png
Views:	1
Size:	70.3 KB
ID:	1171821

    Click image for larger version

Name:	Logic2.png
Views:	1
Size:	123.6 KB
ID:	1171822

    I'll continue to work on solving this problem, but I would like to ask for any ideas that may help. Please?

    #2
    If the character is in air, you should just disallow jump and crouch with bools.

    Comment


      #3
      You should set the Crouching bool variable in the uncrouch and crouch functions. Also, for your jump event, use bIsFalling in the branch so you can prevent the player from jumping if they arent on the ground.
      Stylized Low Poly Environment
      Stylized Low Poly Pine Forest
      Stylized Low Poly Buildings
      First Person Horror Template

      Comment


        #4
        Applying the Is Falling branch the jump event seems to have solved the problem. Thank you for your help.

        Comment

        Working...
        X