http://pastebin.com/yQ2jHPii
> I put my script on pastebin for better overview.
This is the script I attached to a turret .
Basic explaination: It ckecks for enemies nearby and alligns itself to them, calls shoot() function once in a while.
The Bullet itself is only for the visual. To hurt the enemy, I will later acces the enemy script trough the turret and call a hurt function.
In the start funcion I set up an emitter which should look like a bullet flying .
I want to know how i properly let the emitter play , and have multiple bullets at one time. ( or just how to play it , i can make the bullet run faster so it would be no problem if it gets resetted).
I made an attempt in the Shoot() function, but i cant see anything inside the game.
2
The performance is still a littlebit low, I can spawn ~30 turrets at normal fps and when I spawn more it gets lower (not over time, the more turrets the less fps). I personally think its caused by my computer or lua, but still if you can find anything that could cause less performance please tell.