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
B++
16
Years of Service
User Offline
Joined: 6th Dec 2009
Location: India
Posted: 20th May 2010 14:04 Edited at: 20th May 2010 14:05
Hi,
Can someone pont it out, what is going wrong? Why without obj_select why it is selecting all objects. I know there is something wrong but I can\'t figure it out.

if "_Object(o).Selected = 1" is not the right way then how will I select one object at a time?

Thank you


Your Signature Here;
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th May 2010 15:36
Not a lot of code to go by but are you exiting the 'for' loop once you have found an object? (maybe by setting o and p to high values once you have a selection)

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th May 2010 16:21 Edited at: 20th May 2010 16:22
Quote: "(maybe by setting o and p to high values once you have a selection)"

Or use exit, or simpler, move that section into a function then exit passing the required variable back.

However, I'd completely restructure your code to remove redundant calls. Based on the code you've provided, I'd probably do an object selecty thing like this...



If it were my code, this would be in a stand alone function.

My signature is NOT a moderator plaything! Stop changing it!
B++
16
Years of Service
User Offline
Joined: 6th Dec 2009
Location: India
Posted: 20th May 2010 19:09
Mobiius:
My type is exactly the same like u mentioned. only I used id instead of ObjectNumber.
Dim _Object(_total) as Object and _total is 9999.
pickObject = pick object(mousex(),mousey(),1,_total).
Just could not figure out how to implement that to get the ObjectNumber.

Mobiius thank u. it is solved.
baxslash, thank u for replying.

Regards


Your Signature Here;
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th May 2010 21:07
Glad I could help.

My signature is NOT a moderator plaything! Stop changing it!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st May 2010 01:16
Glad I could... reply.

jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 21st May 2010 02:01
Glad I could read this and saw that the solution already had been posted.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st May 2010 02:16
Glad you read this and were glad that the solution had already been posted.

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 21st May 2010 10:34
I just want everyone to get new hats!

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

Login to post a reply

Server time is: 2026-07-25 16:18:53
Your offset time is: 2026-07-25 16:18:53