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 pick vertor Issue

Author
Message
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Nov 2011 15:13
Hi there. I'v been trying to figure out what's wrong in this code, that I can't pick object correctly if object is even number, but it works perffectly with odd numbers . I have a poor solution with a hidden object checking for collision, but I don't like that. Any idea?



Cheers.

I'm not a grumpy grandpa
Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 28th Nov 2011 16:23
Hey Chafari, I changed this line:



And now you can move all the objects

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Nov 2011 16:28 Edited at: 28th Nov 2011 16:29
Why do you think it should work for even numbered objects?

Look at this line again:



Edit Cybermind beat me to it.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Nov 2011 17:10
@Cibermind Thanks !! it really works .


Quote: "Why do you think it should work for even numbered objects?"



Well, I feel myself like a stupid, but I thought that if we don't specfiy mouseclick() number..it should be 1

Thanks again

Cheers.

I'm not a grumpy grandpa
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Nov 2011 17:21
pick object is the problem not mouseclick
Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 28th Nov 2011 17:24
No, not the mouseclick() = 1, try and run your original code in the first post, when moving even blocks use right mouse button and when moving odds block use left mouse button

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Nov 2011 17:56
Quote: "try and run your original code in the first post, when moving even blocks use right mouse button and when moving odds block use left mouse button "


That is strange In my first code above I tested that I can move with right mouse:
1-3-5-7-9 objects

and with leftmouse:
2-3-6-7-10

but objects 4 and 8 can't move them with any button.

Quote: "pick object is the problem not mouseclick "


Green Gandalf have you ever had a problem with pick object ?

Cheers.

I'm not a grumpy grandpa
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Nov 2011 21:28
Quote: "Green Gandalf have you ever had a problem with pick object ?"


No - but you have because you've misused it.

Quote: "try and run your original code in the first post, when moving even blocks use right mouse button and when moving odds block use left mouse button"


It's working bitwise I guess which is why objects 4 and 8 don't move either way.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Nov 2011 23:24
Quote: "No - but you have because you've misused it"


Probably you're right

Now that is solved thanks to Cibermind

Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-10 07:38:05
Your offset time is: 2026-07-10 07:38:05