Page 1 of 1

HELP ME

PostPosted: Fri Jul 09, 2010 1:58 am
by Setokyo
Hi i am new to game-Editor and game making i need a easy tutorial on making a simple game wit one lvl
can anyone help me wit this
thank you if you can
:D :mrgreen:

Re: HELP ME

PostPosted: Fri Jul 09, 2010 2:06 am
by jimmynewguy
um. can you be just a little more specific? a game with one level could really be anything :)

Re: HELP ME

PostPosted: Fri Jul 09, 2010 2:20 am
by Setokyo
Something like a Mario type like game
and one lvl
:D
Can you help? :)
Can anyone

Re: HELP ME

PostPosted: Fri Jul 09, 2010 4:09 am
by krenisis
ok i made one here
viewtopic.php?f=4&t=8572

Re: HELP ME

PostPosted: Fri Jul 09, 2010 3:19 pm
by Setokyo
I don't get the
if(jump==1)
{
yvelocity=-20;
jump=0;
}
can you help me on this more in depth?

Re: HELP ME

PostPosted: Fri Jul 09, 2010 3:37 pm
by DilloDude
In this case jump is a variable created to store a true/false (1/0) value, representing whether or not you can jump.
Code: Select all
if (jump == 1)

this is an "if" statement - a type of conditional. In this case, the condition is "jump == 1". The "==" makes a comparison, so it will return true if both values (jump and 1) are equal.
After this there is a code block, which is surreounded by { } This is what should be done if the condition (jump == 1) returned true.
Code: Select all
yvelocity = -20;

This sets the event actor's (the actor the event is on) velocity on the y-axis to -20; that is, moving upwards at twenty pixels per frame.
Code: Select all
jump = 0

This sets jump back to zero, so that next time the event occurs, the condition at the start will return false, so we can't keep jumping indefinately. We must wait for some other action (presumably a collision with the ground) to set jump back to 1.

Re: HELP ME

PostPosted: Fri Jul 09, 2010 3:44 pm
by Setokyo
Thanks

So that's it 2 make him Jump?

Re: HELP ME

PostPosted: Sat Jul 10, 2010 12:20 am
by krenisis
Ok yes that is to make him jump properly. If you dont use that code , your charactor will be jumping all over the place. If your having trouble , go back to the tutorial and go slowly. It should cover that question and more.

Re: HELP ME

PostPosted: Sat Jul 10, 2010 2:40 am
by Setokyo
Thanks you all :mrgreen: