Tower Defense... Shooting A Target Near Your Tower
Does anyone know any good ways to set up something similar to a tower defense? Like if they place their tower down how can I have it registering where the closest enemy is?
(There will be too many enemies to have each of their X and Y cords)
(There will be too many enemies to have each of their X and Y cords)
Comments
use: > Physics > Collision Shape > Circle on both enemies and towers
don't know the maximum towers your player can place in a scene
you need to store/reference the enemies' X,Y to fire directly at them
@MotherHoose
Thank you that should work. Is there a way to have them fire the bullets in the direction in which they are touching the enemy? I don't know if I will have a way of storing every enemies X,Y or know which enemy is which
It is a top down, but does not have a grid. Should I have one in there? If so how would I go about doing that?
The way I am designing it is more open area. Its almost like Warcraft/Starcraft except your troops don't move and you can place them anywhere (with the exception of too close to another character)
Well thank you. It is definitely worth looking into at the very least. I'll check it out now and see if maybe I can go that direction.
The only other way it might work would be with a table? You can place information in the tables dynamically and have constrain attributes for each spawned enemy so I know their x and y's you think?
http://www.funkymunkygames.com/Promo/Snap_to_grid_demo.zip
Thanks. Thats pretty cool. I heard that Code Monkey has a pretty good grid template or something that is designed for tower defense like games. I'm trying to find that and hoping it will solve the predicament.
http://www.funkymunkygames.com/Promo/dragging.snapping_actor.gameproj.zip
http://www.funkymunkygames.com/Promo/grid_based_game.gameproj.zip
@simo103 … you sure are giving us some goodies!
Thanx!
@};- MH
EDIT: also √ this one from simo … not on-topic; but wonderful: http://forums.gamesalad.com/discussion/39820/free-template-wheel-spin#Item_4
@FallacyStudios .. no problem!