- Home /
Question by
jeanfrg · Feb 07, 2013 at 01:43 PM ·
javascriptspeeddelayattack
Need help with implementing attack speed/delay
Hi, Can anyone help me with implementing a delay between every attack?
Right now my code;
Checks if enemy is within range
Calls attack method while enemy is within attack range
How can I implement an attack speed/delay so that the enemy does not attack constantly?
Comment
Best Answer
Answer by T27M · Feb 07, 2013 at 01:51 PM
There's an example using Time.time the unity script ref, I've adapted this a couple of times for my projects.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Audio loop after time 2 Answers
how to slow down speed increase? 2 Answers
Unity,How to make training Target Enemy 1 Answer
How to simplify my Equipment method? 1 Answer