#weapon cooldown
1 messages · Page 1 of 1 (latest)
why do you have 2 of the same events and if statements? Just combine them
(on the lower if statemen you also forgot a colon)
.
As for the cooldown, you have some options
-
use the
item cooldownfrom skbee. -
Pros: very simple
-
cons: affects an itemtype, not an individual item. Ie, if you apply a cooldown to a diamond sword, it applies to all diamond swords
-
set a metadata tag
-
cons: a little more complicated
-
pros: very versatile
because depending on how many mobs there were would be how many seconds strength
for example 5 mobs 25 seconds
would i be able to make it so only diamond swords with a specific name be affected?
then put that line out of the loop
yes
sorry for lots of questions but where can i find the skbee refrence
i am fairly new to skript
ty
your website didnt help
if name of event-item is "&lAtmos Sword":
if difference between now and {%player's uuid%.atmosSword.lastUsed} is less than 5 seconds:
message "Wait 5 seconds before use again!" to player
else:
loop all entities where [input is not player]:
if distance between the player and loop-entity is smaller than 5:
apply weakness 1 to loop-entity for 5 seconds
apply strength 3 to player for 3 seconds
set {%player's uuid%.atmosSword.lastUsed} to now``` what did i do wrong here?]
the cooldown doesnt work
@robust oak
sry for ping
why did you close the post?
you need to indent all code after the if statement on line 2, and the last 2 lines should be indented within the else section