Having trouble stalling attack.
|
|
See, the problem is, I want attack to be stalled, and only done every so often. The .center key is macro'd for the Attack verb, which is hidden. But, if I hold it down, it pretty much spams a large amount of attacks towards the mob its attacking. Below is the code, any ideas for stalling it would be appreciated, and you can see the method I try'd.
proc/Attack(mob/victim) if(!client) var/potential_damage = rand(Weapon, MaxWeapon) + Strength victim.TakeDamage(src, potential_damage) else if(attack_stall >= 1) var/potential_damage = rand(Weapon, MaxWeapon) + Strength victim.TakeDamage(src, potential_damage) attack_stall = 0 else sleep(15) attack_stall = 2
Thanks in advance.
|