Jump problems

Game Editor comments and discussion.

Jump problems

Postby Turon » Sat Dec 04, 2010 4:33 pm

Yvelocity Jumps
Code: Select all
yvelocity=-10;
And as long as I press on the jump key it will always GO UP! and i would like to know how to make a more real like jump.............. anyone's help?
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Jump problems

Postby Hblade » Sat Dec 04, 2010 5:15 pm

Set for "No Repeat", or set for if (var==1) { do_jump; } and when you land on the ground, var=1;
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Jump problems

Postby zxcvbnm » Sat Dec 04, 2010 9:07 pm

Turon I know your excited to start making games but when you 1st came I told you to do my tutorials 1st. Alot of questions you asked are answered there.

Here is the link to the tutorials please read them slowly and you will find life much easier.

viewtopic.php?t=8680&f=4
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: Jump problems

Postby Kalladdolf » Sun Dec 05, 2010 5:28 pm

Of course you also need some gravity to make the player fall down again. Draw actor -> yvelocity += 1;
That's the most basic form of 2D gravity.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Jump problems

Postby Turon » Tue Dec 07, 2010 5:27 pm

Alas! For Kren it did not work! :cry: :cry:
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Jump problems

Postby Turon » Sun Dec 19, 2010 4:59 pm

My problem has been simplified. My problem is that people do give good advise on the jump issue but when i put it in my game it will take in the code, but my player does not get off the ground what is the PROBLEM! :( :( :(
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Jump problems

Postby lcl » Sun Dec 19, 2010 5:15 pm

To make your actor jump, do this:
Your actor draw actor code:
Code: Select all
yvelocity ++;

Key down, the key you want, script editor:
First click variables - add - name the variable jump - click add
Then write this to script editor:
Code: Select all
if (jump == 1)
{
    yvelocity = - 10;
    jump = 0;
}

Then, the most important thing!!!
Collision - top side of your ground actor - repeat:yes - script editor:
Code: Select all
jump = 1;


This works. You don't have to do anything but copy these codes to right places.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Jump problems

Postby zxcvbnm » Mon Dec 20, 2010 3:24 am

Turon the reason it doesnt work is you didnt declare the variable jump. Jump is not a function you have to declare variable 1st. Thats why your having problems and its not working. Do you know how to declare variables?
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: Jump problems

Postby Turon » Wed Dec 22, 2010 11:41 am

You did it! THANK YOU! :D :D :D :D
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Jump problems

Postby Turon » Thu Jan 06, 2011 3:21 pm

Thank you Lcl!
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: Jump problems

Postby lcl » Thu Jan 06, 2011 6:11 pm

Turon wrote:Thank you Lcl!

:D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron