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.

Author
Message
Graysire
11
Years of Service
User Offline
Joined: 18th Oct 2013
Location:
Posted: 9th Jan 2014 19:17
when you use mousclick how do you make it record the object number of the object clicked for use in variables?
Virtual Nomad
Moderator
19
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th Jan 2014 05:20 Edited at: 10th Jan 2014 05:23
if mouseclick() = 1 then thisOb = pick object (mousex(),mousey(),firstOb,lastOb)

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Graysire
11
Years of Service
User Offline
Joined: 18th Oct 2013
Location:
Posted: 10th Jan 2014 19:08
for some reason when I click on objects the variables do not change. do you know why?
Virtual Nomad
Moderator
19
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 11th Jan 2014 03:47
Quote: "if mouseclick() = 1 then thisOb = pick object (mousex(),mousey(),firstOb,lastOb)"

...will "record" the last object picked by setting the variable thisOb to whatever object (if any) is found via pick object.

try the following code:


if that doesn't help understand its use, you'd better provide an example of your code that doesn't work.

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit

Login to post a reply

Server time is: 2025-05-15 13:59:53
Your offset time is: 2025-05-15 13:59:53