Page 1 of 1

Does anyone have an endless runner ged example? or help me?

PostPosted: Fri Nov 08, 2013 10:21 pm
by knucklecrunchgames
I'm currently making an endless runner game called, Amazing Runnerz. The game is released on the game editor forums but I'm making the update. Like Rebenely, I have the same problem,(the mouse clicking and the player jumps. But my charater multiple jumps when I multi press it :( ) and schnellboot replied. I tried to understand his reply but I couldn't understand it :P Can anyone either:

Upload me a ged demo

reupload my ged file with the problem fixed

or explain it easily as a reply post

please reply, and I'll put your name in the credits of my new game

KnuckleCrunchGames

P.S here is the ged -
Amazing Runnerz problem.zip
(42.14 KiB) Downloaded 225 times

Re: Does anyone have an endless runner ged example? or help

PostPosted: Fri Nov 08, 2013 11:30 pm
by skydereign
If you don't understand what someone meant in a post, reply to that post asking instead of making a new topic. There's less clutter that way. But since you already created this topic, what schnellboot was getting at is the reason for multiple jumps is that there is no jump variable limiting the number of jumps the player can have. Typically people create a variable called jump, which when colliding with the ground actor is set to one. When you jump, you use code like this.
Code: Select all
if(jump>0)
{
    jump--;
    player.yvelocity = -10;
}

Notice with that code, if jump was 0, the player can't jump anymore. And if jump was greater than or equal to 1, the player can jump (and it will reduce jump by 1, eventually stopping the player from jumping).

Re: Does anyone have an endless runner ged example? or help

PostPosted: Fri Nov 08, 2013 11:42 pm
by knucklecrunchgames
skydereign wrote:If you don't understand what someone meant in a post, reply to that post asking instead of making a new topic. There's less clutter that way. But since you already created this topic, what schnellboot was getting at is the reason for multiple jumps is that there is no jump variable limiting the number of jumps the player can have. Typically people create a variable called jump, which when colliding with the ground actor is set to one. When you jump, you use code like this.
Code: Select all
if(jump>0)
{
    jump--;
    player.yvelocity = -10;
}

Notice with that code, if jump was 0, the player can't jump anymore. And if jump was greater than or equal to 1, the player can jump (and it will reduce jump by 1, eventually stopping the player from jumping).


I'm very sorry sky but I'm still confused. Do I enter in this code you gave to me? is there any endless runner game ged file on the forums, that way I would understand better :) again sorry to annoy you.

Re: Does anyone have an endless runner ged example? or help

PostPosted: Fri Nov 08, 2013 11:50 pm
by skydereign
knucklecrunchgames wrote:I'm very sorry sky but I'm still confused. Do I enter in this code you gave to me?

This is a very simple problem that doesn't apply to just endless runner games. You don't need an endless runner ged to figure this out. All you need to do is create a variable called jump. In the player's collision event with the ground, set jump to 1. In the player's jump event, check if jump is greater than 0, and if so set yvelocity for the player to the proper jump value and lower jump by 1. That last bit I already provided the code. If you still don't understand, there are plenty of demos already showing how to stop infinite jumping that you can search for on the forums.

Re: Does anyone have an endless runner ged example? or help

PostPosted: Sat Nov 09, 2013 12:25 am
by knucklecrunchgames
skydereign wrote:
knucklecrunchgames wrote:I'm very sorry sky but I'm still confused. Do I enter in this code you gave to me?

This is a very simple problem that doesn't apply to just endless runner games. You don't need an endless runner ged to figure this out. All you need to do is create a variable called jump. In the player's collision event with the ground, set jump to 1. In the player's jump event, check if jump is greater than 0, and if so set yvelocity for the player to the proper jump value and lower jump by 1. That last bit I already provided the code. If you still don't understand, there are plenty of demos already showing how to stop infinite jumping that you can search for on the forums.


THANKYOU THANKYOU THANKYOU THANKYOU!!! If I could I would give you +100. But sadly I can only give you 1 a day, even though you deserve more :)