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.

DarkBASIC Discussion / help with jumping

Author
Message
aotlo
19
Years of Service
User Offline
Joined: 12th Feb 2006
Location:
Posted: 13th Feb 2006 00:35
i am having some trouble with jumping, i got everything to work, but i cant figure out how to make it only jump once and then not jump again untill the spacebar is released and then pressed again.
Classic Evil
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: watching you through your window
Posted: 13th Feb 2006 03:43
try this


There are two types of people in this world: people who are extremly cool and are good at everything and people who are me.
aotlo
19
Years of Service
User Offline
Joined: 12th Feb 2006
Location:
Posted: 13th Feb 2006 04:26
thanks for the help, i cant believe i didnt think of that.

theres the code i have, does anyone have any suggestions for physics so that you can move and jump at the same time. as you can probibly tell i'm new to db.
aotlo
19
Years of Service
User Offline
Joined: 12th Feb 2006
Location:
Posted: 13th Feb 2006 04:43
thanks for the help, i cant believe i didnt think of that.

make camera 1
set current camera 1
make object cube 1,100
position object 1,0,0,200
cy=camera position y()
cz=camera position z()
cx=camera position x()
cx=0
cy=0
cz=0
max=0
position camera 1,0,0,0
point camera 1,0,0,0
abletojump=0
jump=2
do
if spacekey()=1 and abletojump=0 then jump=1:abletojump=1
if spacekey()=0 and abletojump=1 then abletojump=0:jump=0
if jump=1 then position camera 1,cx,cy+10,cz:
wait 100:
jump=0
if jump=0 then position camera 1,cx,cy-10,cz
loop

theres the code i have, does anyone have any suggestions for physics so that you can move and jump at the same time. as you can probibly tell i\'m new to db.
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 13th Feb 2006 14:19
ummm...is that dbp. If it is, it belongs in the Newcomers board or the DarkBasic Pro board.

It looks good so far though


Hippopotomonstrosesquippedaliophobia-Fear of long words
aotlo
19
Years of Service
User Offline
Joined: 12th Feb 2006
Location:
Posted: 13th Feb 2006 20:57
ya, sorry, i orrigionaly planned on using dbc but i havent got it yet so im using the dpb trial.

Login to post a reply

Server time is: 2025-05-23 15:10:26
Your offset time is: 2025-05-23 15:10:26