Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

88 users online



Jumping in Flash

Jumping in Flash

Currently viewing this thread: 1 (0 members and 1 guests)


Ahmult

Ahmult

Neverside Newbie
Status: Offline!

Jumping in Flash

How can I make a character jump in the scene and back to the floor by gavity?

if (Key.isDown(81) and jumping==0) {
jumping = 1;
starttime = getTimer()/1000;
startpos = _y;
}
if ( jumping==1) {
time = getTimer()/1000-starttime;
_y = _y-(startspeed-gravity*time);
if (_y>startpos) {
_y = startpos;
jumping = 0;
}
}
I use something like this script. The character can jump up but he will only jump up 1 pixel. I should continue to press jump button many times and then he will jump continuely.

any help is appreciate

Attachments:

trial.zip 12.93 Kb, 107 views

Last edited by Ahmult, May 7th, 2006 01:11 PM (Edited 1 times)

kamalohe

kamalohe

has crap-for-brains
Status: Offline!

I can fix up a completely different method to go about adding a jump feature of my own for you to use if you would like. I had just been working on it for a game of my own.

Ahmult

Ahmult

Neverside Newbie
Status: Offline!

I would be happy to see it.

I have another question.
Do you have any ideas how to use function to work with conversation and hitTest. When the main character move and touch his friend, any response from his friends will be given. Like some words told by his friend Smile

any help is appreciate

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0156 seconds.