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 / Get Object Collision X issues

Author
Message
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 9th Dec 2010 02:10
Hey, i was wondering, how exactly do you use the get object collision x() command? i try using it, and i always get a value of 0. it wont even work if i put get object collision x (id1,id2) im thinking it could be 'cuase im not using any collision boxes??


All help appreciated!

Behold the new marble game coming soon: Marbsticle Course > > >http://forum.thegamecreators.com/?m=forum_view&t=178472&b=8&p=0 coming January to February 2011
C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 9th Dec 2010 04:07
A code example/snippet of it not working and what you think it should be doing would probably help.

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 9th Dec 2010 04:49
ok by what ive heard, it will return the value the object needs to move back to be in the proper position for sliding data.

here it is:



the output is always zero.

also, if i try to make it like:

get object collision x(1,2)

it says there was a parameter mis-match.


thanks for helping me on all of these things cowbox despite how people make fun of you (as ive heard) you are a cool person

Behold the new marble game coming soon: Marbsticle Course > > >http://forum.thegamecreators.com/?m=forum_view&t=178472&b=8&p=0 coming January to February 2011
C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 9th Dec 2010 06:43
xD Thanks, I try my best but people usually just get angry at me rather than make fun of me.

Anyway I realised the problem is actually collision boxes.

I thought the command get object collision x needed 2 parameters too but I realised what I was doing was holding the cursor half way through the command but what it was doing was telling my the syntax for get object collision which does require 2 parameters. If you put the cursor between the x and the () on get object collision x() it does actually say *no parameters*.

Either way, I went on the help for get object collision x (a command I'll admit I've never used) and it says in the description:
Quote: "The rotated-box flag is set when you used the command MAKE OBJECT COLLISION BOX. You must have used the make command in order to generate a return value here."


For what you really want, you probably either need collision boxes, another command or Sparky's collision DLL.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Dec 2010 11:32 Edited at: 9th Dec 2010 12:05
You need to have collision boxes, and the get object collision x() command will only return something if two objects are colliding, and you use the object collision() for those objects:



TheComet [b]

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 9th Dec 2010 23:28
I see! Ok, so after doing research, it seems that get object collision x, y, and z are what i would need for sliding collision, correct?

Behold the new marble game coming soon: Marbsticle Course > > >http://forum.thegamecreators.com/?m=forum_view&t=178472&b=8&p=0 coming January to February 2011

Login to post a reply

Server time is: 2026-07-21 19:18:45
Your offset time is: 2026-07-21 19:18:45