Can someone plz help me come up with some diffrent metods for placing towers in a grid, and dont let you place towers on a already placed tower. And dont allow you to build on the lane where the creeps come.
1 Answer
1You could set up some sort of grid and then when you click you instantiate the objects. you could then set up some sort of if function to see if that grid is allowed to be placed on or that its in a grid and you could also check for collisions or triggers on previously placed towers. something like
OnTriggerEnter():
//put here that you cant create the tower. maybe have it just destroy the tower your placing
you might even be able to set up the grids into a trigger and if there is no trigger then you can't place the tower that sort of thing. does that help?