i added some turret in my game.
some are working fine.
but i have one kind of turret i cant code properly
since my method dont work, maybe someone have an idea.
these turret goes by group.
if one turret of "group 1" have line of sight on the player, all turret of "group 1" shoot.
they shoot straight, dont need to target the player.
i want add an instance variable called shoottimer, where i can enter the rate of fire of this particular turret.
some will shoot every 1 sec, some every 0.5, some every 2, etc.
and i need to tell each turret which rate of fire it will be.
and when no turret of "group 1" see the player, they all stop firing
(but turret of "group2" may fire)
i cant make it work ! someone could help ?