I am stuck with this bug, so I am making a guns script, everything is working fine, but I made an automatic gun and it just fires too quickly that some projectiles sometimes doesn't damage the entity (mob, animals, or players).
Here is my code:
Skript Version: 2.2dev36
Skript Addons: SkQuery, SkRayFall, Skellet, TuSKe, SkNBeeT, Sk-Perm, and SkDragon
I hope someone can find a solution to this issue, thanks.
Here is my code:
Code:
command /gun:
permission: command.gun
permission message: no
trigger:
set {autoGun} to iron ingot named "&aAuto gun"
give {autoGun} to player
on rightclick:
if player is holding {autoGun}:
if {autoGun::%player's uuid%} is set:
if now > {autoGun::%player's uuid%}:
shoot a snowball from the player at speed 2.75
set {autoGun::%player's uuid%} to 0.1 seconds from now
stop
shoot a snowball from the player at speed 2.75
set {autoGun::%player's uuid%} to 0.1 seconds from now
on damage:
if attacker is holding {autoGun}:
if attacker is a player:
if projectile is a snowball:
damage victim by 0.5 hearts
stop
Skript Version: 2.2dev36
Skript Addons: SkQuery, SkRayFall, Skellet, TuSKe, SkNBeeT, Sk-Perm, and SkDragon
I hope someone can find a solution to this issue, thanks.