Help with object picking (Switching modes)

Blitz3D Forums/Blitz3D Beginners Area/Help with object picking (Switching modes)

Guy Fawkes(Posted 2012) [#1]
Hi all, JUST when I thought it was over, I found one LAST glitch in this code I've been working on. Can someone please help point out the error of my ways? What it's doing wrong NOW, is when you go into single object select mode, and select an object, then go into double object select mode, and select to or more objects, when u go to click on any other object, for SOME reason, it's making me click twice when trying to deselect an object... Also, when in multi mode, for some reason, it's not selecting the object like it should....



Here's the code:






Any help would be GREATLY appreciated! :)



Thanks! :)

Last edited 2012


Ginger Tea(Posted 2012) [#2]
Seeing as it looks more like Rob's changes from this thread than the one you originally posted, what did you change for it to now break?
Thank you very much, sir :) This is PERFECT! :) I will study it when I get some time :)


if nothing was changed, why start a brand new thread when you could just post in that thread the bug you have found?


Guy Fawkes(Posted 2012) [#3]
Im ignoring all smart-alec comments.


Ginger Tea(Posted 2012) [#4]
It wasn't a smart alec comment, it was an observation that the new code was without checking every single line, very similar to rob's, so if that was true it's gone from PERFECT to broken in an hour.

Then the second was, if you changed nothing then a 6th or so thread on a similar issue, just fragments everything when there was a valid thread you could have posted too.


Guy Fawkes(Posted 2012) [#5]
alls i need it to do is switch correctly between single object select, and multi-object select.


Matty(Posted 2012) [#6]
Out of interest thundros, what kind of game are you planning on making?


Guy Fawkes(Posted 2012) [#7]
It is not a game. It is a level editor / particle editor system :)


Rob the Great(Posted 2012) [#8]
I'm not sure what you're talking about because I couldn't even get multi-mode to work. I had no problem with the double click issue once I fixed the multi-mode version.


From this point forward, I'm not going to just fix broken code for you. I will help you with any questions or problems you are having, but debugging your own game is an invaluable part of understanding your own code.


Guy Fawkes(Posted 2012) [#9]
Try being in single mode 1st. then choosing an object. then choose multi mode. then choose the 1st object u clicked. the double click glitch is RIGHT there. Even in THIS version. Also, in single object mode, it only lets me select it, then unselect it, only once.

Last edited 2012


Rob the Great(Posted 2012) [#10]
Ok, I see what you're talking about now. I've changed the PickAll() function a little bit to get rid of the "oldpicked" variable because it's making things way more complicated than they have to be. Instead, the system is set up where each entity has additional properties (c\selected). This should work now:



Guy Fawkes(Posted 2012) [#11]
Thanks, ALOT, Rob! This is BEAUTIFUL! :) I THOROUGHLY tested it this time, both with copies, and without copies, and I found NO OTHER glitches, WHATSOEVER! :) Thanks again, Sir! :)