• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Double jump?

P

Phemus

Guest
I want to make my character when enter cheat code, it will enable jump 2 times. I'm using this code for cheat code, what should I add?:
Code:
if keyboard_check_pressed(vk_enter)
{
cheat = get_string ("Write /command")
{
if cheat = "gangel"
{
gangel.visible  = true;
}
}
}
 
J

Jaqueta

Guest
You need to check if the input string is a the cheatcode you want, and then, enable the double jump variable.

You do that by putting a similar code into the "keyboard_check brackets"

if cheat="EdnaldoPereira"
{
your_player_object_name_here.double_jump=true
}

Now you need to use that "double_jump" variable on your player to check if the player can double jump or not.
How you do that? Well, I can't tell you, because it's your code xD

But maybe this could help:
 
Top