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.

Newcomers DBPro Corner / making an object (cube) 'jump'

Author
Message
Murder of ravens
20
Years of Service
User Offline
Joined: 17th Jul 2004
Location:
Posted: 16th Jan 2005 17:07
hello, i have made a game where you are a cube trying to pick up all the spheres before the time runs out, The spheres spread out along the ground in a big square but what id really like is to have some spread up as well, allthough i can do that, ive had problems getting the cube to 'jump' i have tried: position object, move object y and for loops but to no avail please offer some suggestions.

An Archangel in bondage Bediademed, souled. With a murder of ravens. But no less Astarte to behold. Abandoned by Heaven To the dead, dark and past. Cast Her dispersions On life's brittle glass.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 16th Jan 2005 21:56
Eyoop, ive knocked this jump code togrther quickly for you, not heavily commented, as its a simple program, but i will happily comment it if you wish.
Hope it helps
Murder of ravens
20
Years of Service
User Offline
Joined: 17th Jul 2004
Location:
Posted: 17th Jan 2005 06:56 Edited at: 17th Jan 2005 07:15
Thats fantastic you helped me out loads and thats one majour headache delt with. ps i love the camera code im gonna play with i and try and make it even nicer.

more comments would be nice cause im not exactly sure how it works, because if you let go of space key as its jumping it dosnt fall until its finished which was what i was having trouble with. thank you

An Archangel in bondage Bediademed, souled. With a murder of ravens. But no less Astarte to behold. Abandoned by Heaven To the dead, dark and past. Cast Her dispersions On life's brittle glass.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 17th Jan 2005 07:35 Edited at: 17th Jan 2005 07:36
Ok here you go !
as i say in the the source, if you need any more info just ask, good luck man !

ps. i didnt remark the camera code but if you want that explained i can too !

pps. also a little prob line 21, it needs to be this for some reason !
global gravity#=1.0
cya
Murder of ravens
20
Years of Service
User Offline
Joined: 17th Jul 2004
Location:
Posted: 18th Jan 2005 05:07
Thanks man this has helped so much, i thikn i understand, yspeed# is constanly going down right? but the object stays on the floor cause of the if object position y(1) command right? thanks again

An Archangel in bondage Bediademed, souled. With a murder of ravens. But no less Astarte to behold. Abandoned by Heaven To the dead, dark and past. Cast Her dispersions On life's brittle glass.
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 18th Jan 2005 06:34
No problem, yep yspeed is constantly going down (unless obviously you press jump) yeah sounds like you got it, nice one !

Login to post a reply

Server time is: 2024-11-27 19:38:30
Your offset time is: 2024-11-27 19:38:30