Turret Target locating

skippertech

  • Posts: 256
Hey Guys, I am making a Game with a turret, turret is simple, it makes an actor and shoots it at an actor, prettty simple to create, however there is going to be multiple actors on the scene, how can I set it up so that the tower targets a character within range automatically

SadiQ

  • Posts: 1795
Create a region arround the turret.When an enemy enters the region, add that enemy to a list, and when you want to shoot just pick one enemy from that list. Remember to remove the enemy from the list when it gets killed or leaves the region.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

skippertech

  • Posts: 256
Create a region arround the turret.When an enemy enters the region, add that enemy to a list, and when you want to shoot just pick one enemy from that list. Remember to remove the enemy from the list when it gets killed or leaves the region.

Didn't even think of it like that,, that is is perfect. Thanks Man!

skippertech

  • Posts: 256
H
Create a region arround the turret.When an enemy enters the region, add that enemy to a list, and when you want to shoot just pick one enemy from that list. Remember to remove the enemy from the list when it gets killed or leaves the region.

How do I tell if an actor leaves the region though

SadiQ

  • Posts: 1795
You can use the same block that you used to check when the enemy enters the region.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.