Sign in to follow this  

Tower Defense, place tower mechanic

Recommended Posts

Im currently in the process of developing a top down tower defense shooter. My question is how would you guys go about having a player click a something (seems a button would be prudent) which would select the appropriate tower (a sprite) and maybe on mousePointer.isDown place the sprite at that location.  I am not new to programming, but a bit new to phaser. After a thorough read of the docs and examples provided online, this is the area I am struggling to figure out. Once the sprite is in game its gg. But allowing the player to place it is the issue I am having. 


Thanks in advance!

Share this post

Link to post
Share on other sites

Does this example help?

If not, there are other examples here:


Otherwise, I think trying to list the things you want to accomplish would help. I'd guess you want to do something like

1) click on structure

2) drag structure to map

3) leave structure in map


Most of that is just a combination of the tutorials that I linked, so hopefully you figure it out

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.