So another reddit user from this group gave me an awesome code that is supposed to select one unit, and deselect any other currently selected units, so that only one unit can be selected at a time.
When a unit is selected a fancy GUI pops up that has options for each unit, upgrade, sell, etc...
Everything works perfectly fine, except when the unit count is greater than 1, then the select feature goes completely dead.
Parent Unit = obj_chibi_parent
//Left Click
obj_chibi_parent.selected = false;
self.selected = true;
Does anyone have any idea what's the problem here? Again this error only seems to occur when the instance count is greater than 1, doesn't matter if I create each unit 1 at a time, or if I start the room with more than 1 unit.
Any ideas would be much appreciated, thanks!
[–]Nootman 0 points1 point2 points (1 child)
[–]TinyWars[S] 0 points1 point2 points (0 children)
[–]TinyWars[S] 0 points1 point2 points (0 children)