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 Professional Discussion / Gravity is becoming problematic...

Author
Message
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 18th Sep 2010 07:21
I need my character to be able to stand on objects 2-29 but if a block is missing or deleted fall down into the missing slot, or if the character isn't standing on a block (2-29 atm) then fall. I can't seem to figure out what I need to do. Below is my entire code.




That doesn't work the way I intended though. How should I do this?

Thanks!
Zeus
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 18th Sep 2010 18:46
I know somebody knows this.
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 18th Sep 2010 23:57
bump
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 19th Sep 2010 01:51
I would advise switching to Sparky's, it'll most likely solve your problem.

LBFN
19
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 19th Sep 2010 02:32
Not at my comp, but from what I can tell, your problem might lie in the
line. I have no idea what value pobj holds as it is obtained by loading in the string pobj$. Why don't you just do this:


and check to see if collision = (the value you want - note: you would have to set collision off your player object)? Same with the BotColSphere. I must say that having three objects for the player is most unusual, but hey, it's your game.

I hope this helps. Be at my comp tomorrow (Lw).

Computers do exactly what you tell them.........don't you hate that sometimes?
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 19th Sep 2010 04:02
MidColSphere checks to see if it colliding with a block that is pushable. BotColSphere checks if the player is standing. I want to use to Sparky's and I looked into it but I have the same question with it as well.
LBFN
19
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 19th Sep 2010 04:53
So I take it you tried my suggestion and it did not work(?) You didn't actually say.

Computers do exactly what you tell them.........don't you hate that sometimes?
Zeus
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 19th Sep 2010 07:58 Edited at: 19th Sep 2010 08:08
You're method worked like a charm! Thank you so much.
LBFN
19
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 19th Sep 2010 15:14
Glad it worked out okay. You're welcome.

Computers do exactly what you tell them.........don't you hate that sometimes?

Login to post a reply

Server time is: 2026-07-23 13:32:59
Your offset time is: 2026-07-23 13:32:59