D
Darren
Guest
I'm making a city builder, if I click on a wall piece I'm going to display its health and also for example destroy that wall piece. When the player clicks on it, I wish for it to become 'selected' and then it will be highlighted, I have set this up but what I want is if the player then clicks something else, it will select that, and unselect the former object.
If I write "with obj_wall (selected = false" then it does it for the object itself also. I've checked the manual and tried to understand the id function but I can't get it to work.
I need a simple code that says if I click on one instance of the wall, it is selected, if I click on another, that wall is selected instead and unselect the previous one. I also want to unselect the current selection if it is clicked again. Any help on this is much appreciated as there will be hundreds of the exact same instances and I could do with wrapping my head around this!
Thanks all
If I write "with obj_wall (selected = false" then it does it for the object itself also. I've checked the manual and tried to understand the id function but I can't get it to work.
I need a simple code that says if I click on one instance of the wall, it is selected, if I click on another, that wall is selected instead and unselect the previous one. I also want to unselect the current selection if it is clicked again. Any help on this is much appreciated as there will be hundreds of the exact same instances and I could do with wrapping my head around this!
Thanks all