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 / Jumping and landing

Author
Message
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 28th Sep 2003 19:44
Hi again. Sorry for posting so much. How do you make it so that when you jump onto a object you don't go through it? Nothing seems to work!

Am I an Idiot...or is everyone else just really smart?
koshi
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Cyberspace
Posted: 29th Sep 2003 03:06 Edited at: 29th Sep 2003 03:15
you need to make a collision function. here a sliding collision snippet made by Phaelax, very nice.


[Edited} oops, you wanted a falling collision srry. For a ground collision you do -


"Hello the is the suicide hotline, please hold..."
http://www.rovokaa.tk/ -
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 29th Sep 2003 03:59
Sorry, I wanted collision for an object.

Am I an Idiot...or is everyone else just really smart?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 29th Sep 2003 17:11 Edited at: 29th Sep 2003 17:13
just use collision in with your jumping code...

For example, if your character jumps then collides with another object and the collition occurs ONTOP of the object (not too sure how to find this), then tell the y# value to stay at that...
that is,
(in Psuedo code)


I know, its not very good Psuedo code, but you get the picture... that is generally how i would go about the problem.. i dont know if it works, but write some code for it, if it works post it, if not, tell me and ill give it a go...

Hope I Helped

If Quizz's Are Quizzical, Then What Are Test's?
Mucky Muck Ninja
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: im not entirely sure
Posted: 1st Oct 2003 01:40
It didn't work.

Am I an Idiot...or is everyone else just really smart?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 1st Oct 2003 03:37
That example was in Psuedo code (ie, it wont work in DB, you'll have to use it as a guide)

but if you tryed changing it and it still didnt work, then sorry...

If Quizz's Are Quizzical, Then What Are Test's?

Login to post a reply

Server time is: 2025-05-20 20:17:09
Your offset time is: 2025-05-20 20:17:09