Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Help with the jump command

Author
Message
Shadow Runna X
21
Years of Service
User Offline
Joined: 12th Jul 2004
Location: Greater London - East
Posted: 19th Nov 2004 21:14
Anyone able to help me make sprites jump. Just tell me the basics, or gimme a snippet of code, It don't have to run, I just wanna know how to.
Qwisats Haderach
22
Years of Service
User Offline
Joined: 23rd May 2004
Location: Dune
Posted: 20th Nov 2004 07:19
u need to know the basics of gravity, which i know i just dont know how to put it into my code or maybee i do and im just lazy lol
Freddix
AGK Developer
23
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 21st Nov 2004 18:49 Edited at: 21st Nov 2004 18:49
in fact, your player must be subject to gravity ( so he will usually fall when no ground is under him ) and jump my disable temporarly gravity
something like this should work :

player_want_jump = 1 if keyboard key to ask for jup is pressed.
JumpHeight = height in pixels the player jump at maximum
JumpStep = height we move player each jump step.

I hope it helped a lot

Login to post a reply

Server time is: 2026-06-11 13:13:18
Your offset time is: 2026-06-11 13:13:18