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 which object is clicked

Author
Message
General Jackson
User Banned
Posted: 22nd Nov 2010 05:07
Hey guys, I have finally figured out how to store object numbers for each object that the user has loaded (into my game engine).
Now I need to detect when the user has clicked on an object, and know which one the user has clicked on.

Where would I begin?

Thanks,

GJ

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 05:51
Im pretty sure i saw somewhere it was a collision detection thing, but i certainly would do a bit of research on the topic. That's just what i heard somewhere...

New 3d marble game coming soon!
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 22nd Nov 2010 05:54
Well to start, loop through all of the availabe objects that can be clicked, Mabey store their numbers in an array and loop through that.
Then use the pick object command to find the object that was chosen.


My computer surpasses all the technologies of the day. What computer do I have?

General Jackson
User Banned
Posted: 24th Nov 2010 17:10
Ok thanks.



Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 24th Nov 2010 19:37
No, you need the pick object.

(From the help file...)


My signature is NOT a moderator plaything! Stop changing it!

Login to post a reply

Server time is: 2026-07-21 12:51:18
Your offset time is: 2026-07-21 12:51:18