how do I Make a character jump properly?

Non-platform specific questions.

how do I Make a character jump properly?

Postby MikeUK » Tue Nov 14, 2006 11:12 pm

Hi, i have just started to use this program and im a lil stuck.
I am tryin to make a character jump , i can make it jump but u can carry on jumping by pressin the jump button and end up out of view. how do i make the character jump just the once and land on the floor and be able to jump again once the character hits the floor ?? help plz :(

iv done it the same way its done on the caveman tutorial
MikeUK
 
Posts: 6
Joined: Tue Nov 14, 2006 11:05 pm
Score: 0 Give a positive score

Postby Game A Gogo » Tue Nov 14, 2006 11:56 pm

YES, this is my CHANCE OF A LIFE!!
I'll make an Animated tutorial on this (like a film or whatever...), but the only thing is, my English accent sucks X[ :( :cry:
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby MikeUK » Wed Nov 15, 2006 12:39 am

ooo good good =)
MikeUK
 
Posts: 6
Joined: Tue Nov 14, 2006 11:05 pm
Score: 0 Give a positive score

Postby MikeUK » Wed Nov 15, 2006 5:41 pm

can any1 tell me now how to do it ? :?
MikeUK
 
Posts: 6
Joined: Tue Nov 14, 2006 11:05 pm
Score: 0 Give a positive score

Postby makslane » Wed Nov 15, 2006 5:51 pm

Create a variable onGround (integer, Actor variable)
In the player actor on Collision with platform:
Code: Select all
onGround = 1;


In the player actor on Collision Finish event with platform:
Code: Select all
onGround = 0;


In the Key Down event disable the repeat option, and put the code:
Code: Select all
if(onGround)
{
   //Put your action here
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby sonicfire » Wed Nov 15, 2006 6:00 pm

I tried this also but when used in conjunction with physical response, the Collision finish event never occurs then :?
sonicfire
 
Posts: 425
Joined: Wed Nov 01, 2006 9:34 pm
Location: berlin germany
Score: 16 Give a positive score

Postby sonicfire » Wed Nov 15, 2006 6:00 pm

Game A Gogo wrote:YES, this is my CHANCE OF A LIFE!!
I'll make an Animated tutorial on this (like a film or whatever...), but the only thing is, my English accent sucks X[ :( :cry:


So, do you have it done now? :) Would like to see it
sonicfire
 
Posts: 425
Joined: Wed Nov 01, 2006 9:34 pm
Location: berlin germany
Score: 16 Give a positive score

Postby makslane » Wed Nov 15, 2006 6:49 pm

Look the cop actor in the Abuse 2 demo. The actor uses a canJump variable and uses Physical Response action too without problems.


Link:
http://game-editor.com/games/abuse2.zip
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby MikeUK » Wed Nov 15, 2006 8:32 pm

oo thanks :)
MikeUK
 
Posts: 6
Joined: Tue Nov 14, 2006 11:05 pm
Score: 0 Give a positive score

Postby MikeUK » Wed Nov 15, 2006 9:42 pm

hmm i did all that and now im stuck on the floor and cant jump
i checked all the events and they all look ok, any1 any idea why i cant jump :?
MikeUK
 
Posts: 6
Joined: Tue Nov 14, 2006 11:05 pm
Score: 0 Give a positive score

Postby MikeUK » Wed Nov 15, 2006 10:39 pm

Nvm done it :)

ty for the help
MikeUK
 
Posts: 6
Joined: Tue Nov 14, 2006 11:05 pm
Score: 0 Give a positive score

Postby Game A Gogo » Wed Nov 15, 2006 11:24 pm

ok, i wont be able to create the video, cuz the sound keeps screwing up!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron