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 / cloud feeling

Author
Message
hpfan273
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 2nd Feb 2007 02:21
ok....... i am making a cloud type game...... where ur the cube.. and u jump from cloud to cloud ((( rite now the clouds are cubes....))) but how do i make it so that when the cube jumps on a cloud... the cloud bounces down and then slowly back up.... it is hard to explain what i want.... but i tried... here is my code just in case u need it... ((( srry about not indenting.... i'm not used to it yet... lol )))



THANKS FOR STOPING AT A RED LIGHT... AND LETTING ME CRASH INTO YOU AT 80 MILES AN HOUR!!!
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 2nd Feb 2007 13:33 Edited at: 2nd Feb 2007 13:48
I do something like so :

type cloud_
x#
y#
z#
yvel#
endtype

type player_
x#
y#
z#
yvel#
endtype

global player as player_
dim cloud(10) as cloud_

have a kind of reverse gravity for the clouds and when the player collides with a cloud transfer his yvel# to the clouds yvel#. With the reverse gravity it would work similiar to the jump (but reversed)

Or you could use a physics plugin - DarkPhysics or Newton.


The word "Gullible" cannot be found in any English Dictionary.
wildbill
18
Years of Service
User Offline
Joined: 14th Apr 2006
Location:
Posted: 2nd Feb 2007 17:23
Since you are using cubes, instead of pre-made objects you cannot animate them. The easiest thing to do would be to have the cube scale down and slowly back up. Check out the object scaling functions.

Login to post a reply

Server time is: 2024-11-26 00:41:48
Your offset time is: 2024-11-26 00:41:48