How to make a single jump start only?

michaeln93michaeln93 Member, PRO Posts: 68

I am trying to make a game where you tap the actor and have him jump into the middle of the screen where he will stay there on a platform, and if he doesn't make it to the platform he simply falls back down to the ground and tries again. The game will be a hold touch style after that so I only want him to jump once off the ground regardless if the player retouch again.

Comments

  • TosanuTosanu Member, PRO Posts: 388

    I recommend a Boolean. Mark it as Jumped or something similar. It will be marked as True when you jump, and false when you collide with a platform. Make the jump command so that you cannot jump unless it is false.

    Will this work for what you are intending?

  • michaeln93michaeln93 Member, PRO Posts: 68
    edited April 2014

    @Tosanu said:
    I recommend a Boolean. Mark it as Jumped or something similar. It will be marked as True when you jump, and false when you collide with a platform. Make the jump command so that you cannot jump unless it is false.

    Will this work for what you are intending?

    I haven't tried it but that sounds about right.

  • TosanuTosanu Member, PRO Posts: 388

    Note that this can cause your character to refresh a jump by hitting the side of the platform, i actually altered it by making an invisible box actor constrained to the bottom of the player actor that extended about 2-4 pixels below the player, and put the collision true/false on THAT, in my own experience.

  • AadeeAadee Member Posts: 24

    @Tosanu said:
    I recommend a Boolean. Mark it as Jumped or something similar. It will be marked as True when you jump, and false when you collide with a platform. Make the jump command so that you cannot jump unless it is false.

    Will this work for what you are intending?

    How do you do that? Is there some type of picture/video that could help me understand?

  • bob loblawbob loblaw Member, PRO Posts: 793
    edited March 2020

    @Aadee said:

    @Tosanu said:
    I recommend a Boolean. Mark it as Jumped or something similar. It will be marked as True when you jump, and false when you collide with a platform. Make the jump command so that you cannot jump unless it is false.

    Will this work for what you are intending?

    How do you do that? Is there some type of picture/video that could help me understand?

    go to @jamie_c (jamie cross) website. he has a series of really good tutorials to make platformers.
    it’ll help you get your head around some other concepts of gs too.

    also, if you look up gshelper on youtube, @tshirtbooth has a heap of good tutorial videos to explain logic concepts.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
Sign In or Register to comment.