#Spear Cooldown

1 messages · Page 1 of 1 (latest)

wild crater
#

Have this code ```on left click with a wooden spear, stone spear, iron spear, golden spear, diamond spear, or netherite spear:
if {lungeCooldown::%player's uuid%} is set:
set {_last} to {lungeCooldown::%player's uuid%}
set {_passed} to difference between now and {_last}

    if {_passed} < 3 seconds:
        send "&cYour Lunge is on cooldown!" to player
        cancel event
        stop

set {lungeCooldown::%player's uuid%} to now```

It sends the lunge is on cooldown message but the lunge still works and doesnt get canceled

restive canyon
#

that

#

why

#

that is bound to be a long parse time

wild crater
restive canyon
#

on left click with a wooden spear, stone spear, iron spear, golden spear, diamond spear, or netherite spear:

#
  tool is tagged with minecraft tag "minecraft:spears"```
wild crater
#

is that better?
its still doesnt fix the problem

restive canyon
#

yes

#

but its less ugly

#

what is {lungeCooldown::%player's uuid%} set to

#

and you arent even checking if tool = enchanted with lunge

wild crater
#

well i want to make sure it actually works first

wild crater
bold cairn
#
on arm swing:
    tool is tagged with minecraft tag "minecraft:spears":
        {LungeCd::%player's uuid%} is set:
            send "&cLunge is on cooldown!" to player
            cancel event
            stop
        set {LungeCd::%player's uuid%} to true
        wait 3 seconds
        delete {LungeCd::%player's uuid%}```

This should wori
#

because Iirc spears go off when u swing your arm not when u left click

wild crater
#

it like doesnt cancel the event, cuz the message is sending

bold cairn
#

then im not sure lunge has been added to sk yet

wild crater
tidal peak
#

had anyone figured this out?

nimble grove
#

sk probally needs an update

restive canyon
#

you can waitatick then set velocity

haughty onyx
#

got another idea, make player hungry

glossy smelt
bold cairn
#

useing effect commands do