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.

Newcomers DBPro Corner / pick object with mouse

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 18th Apr 2006 22:55
im trying to come up with code so i can pick an object by left clicking on it.this is my code,for some reason it only picks object 1.anyone know why this code doesnt work??

Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 18th Apr 2006 23:02 Edited at: 18th Apr 2006 23:03
I'n not 100% sure why, but this works:



David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 18th Apr 2006 23:37
thanks!
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 20th Apr 2006 12:55
ok basically u didn't quite get the "if pick object(mousex(),mousey(),1,2) and mouseclick()=1" bit right.... this is the same as saying "if pick object(mousex(),mousey(),1,2)=1 and mouseclick()=1" therefore pick object could never equal 0 or 2 and so u could only select object 1.

also note that "me=pick object(mousex(),mousey(),1,3)" should really be "me=pick object(mousex(),mousey(),1,2)" because there's only 2 objects

life's one big game
spec= 2ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 22nd Apr 2006 01:07
ok smallg.

cool!if i click empty space,nothing is selected.

Login to post a reply

Server time is: 2024-09-24 21:28:49
Your offset time is: 2024-09-24 21:28:49