- Home /
Tower Target Random Tank
Okej, im trying to do a little game and its about 2 tanks fighting on a platform and some few towers are placed on the map and when any of the tanks drive close to one of the towers, the tower should shoot at the tank thats in the range and if both tanks are there the tower should shoot at the first on to enter the range.
but i dont know what kinde of java-script i should put on the tower
any one have any idea ? :)
Answer by e-bonneville · Apr 24, 2010 at 01:30 PM
You would use a trigger and the LookAt
function, as well as Instantiate
, for the turret's head to shoot. When the tank enters the trigger, it makes itself the target of the tower, which then looks at it and starts shooting. That's the idea, anyhow.
Your answer
Follow this Question
Related Questions
How to make Towers fire at multiple enemies? 3 Answers
Random LookAt or Random Target 2 Answers
How to create a view angle where the turret can see the enemy and start shooting 1 Answer
Unity crashes with my function for random generating paths 2 Answers
How can I rotate a shooting-practice target 180 degrees with a timer in C#? 1 Answer