Hello I need to solve my shooting system and maybe little more understand how C2 works. I looked on forum read something but I still do not understand it.
For example: you have got 3 horizontal lanes you can build a defend towers (on left) to these lines and towers can shoot on enemies. Enemies are random spawned at the lines (on right) and run to towers (from right to left).
I need to make:
- shooting condition for these towers (if enemy and tower in same line has same Y position than shoot)
- shooting speed (I would like to make it as variable of these towers)
- stop shooting if there is no enemy in same line as tower
screen help to understand what I mean... similar to Plants versus Zombies game ;)
<img src="http://img801.imageshack.us/img801/5875/68ci.png" border="0" />
I think I need to create independent timer for every instance of tower and independent picking of instances if tower instance has same Y position as some enemy than tower start shooting when enemy die tower stops...
I really need to solve it thank you very much for some solution and example (sorry for my low english)