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

Some progress: https://denischera.com/reactor_defence2/index.html

For now you can just add some money with 'space' and upgrade 1 state of reactor, clicking on it :) But in general it's not playable yet, just mobs moving through all the floors.

By the way, that's REALLY huge disadvantage that Defold has no built in function of selecting objects by clicking on them. For now, I am kinda not sure how to realize upgrading not only reactor, but other objects (turrets, etc) :(

(+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!

we have a first playable! :dance: