How to make a single jump start only?
michaeln93
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
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.
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.
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.
My website has recently changed, but you can still find all my videos at my youtube channel. https://www.youtube.com/channel/UCvX4ldnR4K_jrlT_LNN760Q
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page