x


Tower Defence placing towers.

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.

more ▼

asked Apr 09 '11 at 01:25 AM

Victor 1 gravatar image

Victor 1
87 13 13 20

(comments are locked)
10|3000 characters needed characters left

1 answer: sort newest

You 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?

more ▼

answered Apr 09 '11 at 04:40 AM

cidmodder gravatar image

cidmodder
191 47 56 69

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x268
x36
x1

asked: Apr 09 '11 at 01:25 AM

Seen: 1386 times

Last Updated: Apr 09 '11 at 01:25 AM