11-03-2013, 05:44 AM
I think that the AI calls that function only when the mob is close enough to do melee damage to the player. So the skeleton would have shoot arrows as soon as it got close to you. You might want to move that code to somewhere where the physics is ticked.