4
« on: July 02, 2014, 07:09:41 pm »
Hey Guys, I have been pulling my hair out on this for a few hours and I cant seem to figure out how to pull this off,
I am building a tower defense game, with simple enemys walking left to right. Basically what I am trying to do is get the tower to target an enemy. So it was suggested to me to once the enemy enters a region to target it. THAT part is simple. Where it gets difficult for me to figure out is what happens when a second enemy enters, and shortly after that first enemy dies or leaves the region, how can I get it to basically go down a list of choosing chronologically the enemys to target when they enter. (The tower can only shoot 1 enemy at a time)
The idea would be 3 enemys could enter nearly at the same time, but the tower would target the one that first entered, and when that enemy dies, the second one that entered and then the 3rd and so on. My goal is to make it never ending and smooth
ANY help or links to tutorials, example games, anything would be a huge help. Hopefully I make sense, Thanks guys.