(edit) - ok, I just read the part that said "i was only testing selecting/deselecting cone2" :) In that case all you need to do is change the line "Case Cube1" to "Case cone2". it was still looking for Cube1, but you had renamed it to cone2. I'll leave all the rest of this just in case though
Basically what you need to do goes like this:
1: Decide if the user has dragged a rectagle
2: If he has, then decide what objects were inside that rectangle
3: If an object was inside the rectangle, the set it's variable to '1', if not then set it to '0'
4: for all of the objects whose variables are set to '1', do something to make it obvious it is selected (such as making it brighter, white, etc.)
Ok, so to do that, first off you should do the rectangle code. What you already had before for dragging a rectangle will work fine, except that we need to know when the user has let go of the mouse button. If he has, then we move on to step 2. To decide if he has, at least in my code, I used a varible (called 'mouseSet'). When the user pressed the button, it was set to 1. Then If the button was not pressed, but 'mouseSet' was equal to 1, then i know the user has realeased the button.
So then to decide if the entity was inside the rectangle, we use CameraPick, like you were in your origional code. So before we do anything we reset all of the objects variables to '0'. Then we go through each pixel inside the rect, and use CameraPick on that pixel to see if it is an pickable entity. Since CameraPick will return the entity that was picked I use Select/Case, (If..Endif will work too, just a little differently) if the picked entity was any of the entities i want to be able to select, then we set its varible to '1'. You really don't need to go through each pixel, you can skip most of them, but you lose accuracy. I did this by using 'Step 4', which skipped every 4 pixels.
Now in the main loop, we go through all of the variables for our objects. If it is '1', then we do something (maybe highlight it or something), or if it is '0' then we do something else (like darken it).
Ok, that's a lot of stuff there. I hope at least some of it is useful, and helps you out. If it's still not making sense, don't give up on it, keep trying stuff til you get it to work. Some of this kind of stuff might be a little hard to understand, especially if you're just starting out.
Basically what you need to do goes like this:
1: Decide if the user has dragged a rectagle
2: If he has, then decide what objects were inside that rectangle
3: If an object was inside the rectangle, the set it's variable to '1', if not then set it to '0'
4: for all of the objects whose variables are set to '1', do something to make it obvious it is selected (such as making it brighter, white, etc.)
Ok, so to do that, first off you should do the rectangle code. What you already had before for dragging a rectangle will work fine, except that we need to know when the user has let go of the mouse button. If he has, then we move on to step 2. To decide if he has, at least in my code, I used a varible (called 'mouseSet'). When the user pressed the button, it was set to 1. Then If the button was not pressed, but 'mouseSet' was equal to 1, then i know the user has realeased the button.
So then to decide if the entity was inside the rectangle, we use CameraPick, like you were in your origional code. So before we do anything we reset all of the objects variables to '0'. Then we go through each pixel inside the rect, and use CameraPick on that pixel to see if it is an pickable entity. Since CameraPick will return the entity that was picked I use Select/Case, (If..Endif will work too, just a little differently) if the picked entity was any of the entities i want to be able to select, then we set its varible to '1'. You really don't need to go through each pixel, you can skip most of them, but you lose accuracy. I did this by using 'Step 4', which skipped every 4 pixels.
Now in the main loop, we go through all of the variables for our objects. If it is '1', then we do something (maybe highlight it or something), or if it is '0' then we do something else (like darken it).
Ok, that's a lot of stuff there. I hope at least some of it is useful, and helps you out. If it's still not making sense, don't give up on it, keep trying stuff til you get it to work. Some of this kind of stuff might be a little hard to understand, especially if you're just starting out.