I need help with TowerDefense based game.

Hello,
I wanted to ask what is the best way to add:

  1. When turret is picked (clicked/bought) from shop → Display turret and his range on mouse position
  2. When turret is placed on a ground → Remove turret and his range from mouse position,
    also remove range from placed turret
  3. When you hover turret in shop with your mouse → Display some kind of stats (range, damage, fire rate)
  4. When you hover “upgrade” (which is found when you click on a placed turret) → Display what stats will be upgraded. (range 15 → 20, etc.) *This should have some kind of UI.
    Can anyone help me with this?

Thanks.

Hello,

Yes we know you are a beginner beacause you ask a “beginner question” => I want to do a tower defense with Unity, what do I do ? =)

What you need to do is to process step by step => and that exactly what you do when you write 1) then 2) then 3) then 4), continue this way.

You can go deeper in this :

  • 1.a) Make a turret pop on the scene when a “Pop” method is called
  • 1.b) Call “Pop” when clicking a turret in the shop
  • 1.c) Make a turret follow the mouse on the scene
  • etc…

Tap “Unity tutorial tower defense” in Google and some guys will give you some ideas, but you can’t just find a tutorial that does “exactly” what you want to do. That’s why you need to proceed step by step.

Rather than asking “How do I do a tower defense”, ask “How to instanciate an object on the scene ?”, then when you have figure it out, ask “How do I make an object of the scene follow the mouse position ?”

=> Try to find the answer by yourself by searching in the doc, and if you can’t find what your looking for, then use this help room. The most your “deep in the steps” the most precise is your question the most it’s easy for the other users to help you

Good luck with this :wink: