- Home /
Question by
chakuze · Apr 26, 2014 at 11:41 AM ·
javascriptfunction
Function is called twice and I've no idea why
The function attack() is called twice even though it shouldn't be possible, because the counter variable, which I've implented for debug purpose is higher than 0. see this pic for detailed info: http://imgur.com/dECW4yN
thanks in advance for a reply!
Comment
Answer by Desination-X · Apr 26, 2014 at 11:55 AM
Try putting counter++; before AttackDamage(); This should help.
Your answer
Follow this Question
Related Questions
Accessing function from another script won't work 1 Answer
functions file and NullReferenceException: Object reference not set to an instance of an object 1 Answer
Restart this script 3 Answers
How to call a function from a script in another scene 5 Answers
How do I use function OnGui to display a 2D texture? 1 Answer