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 / platforming help

Author
Message
Mr Penguin99
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location:
Posted: 9th Feb 2008 18:50
I think it is the collision that is not working right here is the code
Twu Kai
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 10th Feb 2008 14:32 Edited at: 10th Feb 2008 14:45
Your code checks for the collision outside of the do-loop. You need to put it inside. SET OBJECT COLLISION ON 1 is fine, it's just the IF statements that need to go inside the loop. What's happening is that each time the do-loop loops, it checks for what you ask it to check. Your code only checks once, and then it starts looping which means that the gravity/collision never happens. Hope that's clear.

Mr Penguin99
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location:
Posted: 10th Feb 2008 16:57
how do i fix it?

thanks
Twu Kai
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 10th Feb 2008 18:41 Edited at: 10th Feb 2008 18:42
You need to change your code from what you posted to the below.


Mr Penguin99
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location:
Posted: 11th Feb 2008 03:40
it still does not work right, gravity only happens if i move up or down and if i hold the space down i can keep going up.

thanks
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 11th Feb 2008 16:18
Works fine for me. Maybe it has something to do with your model? Also check to see if you have the latest DBPro version (1.066 I think)


Powered by Box2D Physics. Thanks Diggsey!
Mr Penguin99
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location:
Posted: 11th Feb 2008 17:45
i'm using the Trial Version of DarkBASIC Professional.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Feb 2008 22:18
Mr Penguin99:

Please bear in mind that the trial version of DBPro is only meant to give you a taste of what using it is like.

It is well out of date now as the full version you buy has had many updates, whereas the trial is still the old non-patched version.

So, any problems you encounter in the trial should not be taken to mean they are present in the version we all use.

After all, if the trial was as good as the full version, no-one would update to the full version!

TDK_Man

Login to post a reply

Server time is: 2024-11-25 07:58:23
Your offset time is: 2024-11-25 07:58:23