Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

Hey Dener,


You could use a game object attached to the mouse (set go.set_position of the object to the mouse co-ords on each update) that has a kinematic collision object attached, and then your turrets would also have a collision object (with the type and mask set appropriately so they register each other). You can then check when the mouse clicks if it's colliding with anything, and if so, send a message to the "message.other_id" of what it's colliding with (the turret), telling it to run its upgrade function, or whatever.

(2 edits)

Yeah, I use this kind of approach with reactor already :) Just thinking how to scale this approach to use with multiple objects. A bunch of elseifs makes the code kinda bulky. Thanks anyway!