#weapon cooldown
1 messages · Page 1 of 1 (latest)
- dont loop all entities, just loop the ones in radius 5;
loop all entities in radius 5 around player where [input != player]:
like the effects dont work
that still doesnt help...
sorry someone else was helping me
sorry but it doesnt have errors and its supposed to effect the player with strength and effect the entites in a 5 block radius with weakness, whats happening that i dont want is its not working and when i rightclick no effects will show up
have you done this?
if so, its likely one of your conditions fail
you'll want to debug it then
https://x8ight.gitbook.io/syntask/issues/debugging
could i have a skript doc
permission: op
permission message: &cNuh uh
trigger:
give player netherite sword named "&lAtmos Sword"
on rightclick:
if name of event-item is "&lAtmos Sword":
if difference between {atmosSwordCooldown::%player's uuid%} and now is greater than 60 seconds:
loop all entities in radius 5 around player where [input != player]:
apply weakness 1 to loop-entity for 5 seconds
apply strength 3 to player for 3 seconds
set {atmosSwordCooldown::%player's uuid%} to now```
if i were to add loop all entities in radius 5 around player where [input != player]:
permission: op
permission message: &cNuh uh
trigger:
give player netherite sword named "&lAtmos Sword"
on rightclick:
if name of event-item is "&lAtmos Sword":
if difference between {atmosSwordCooldown::%player's uuid%} and now is greater than 60 seconds:
loop all entities in radius 5 around player where [input != player]:
apply weakness 1 to loop-entity for 5 seconds
apply strength 3 to player for 3 seconds
set {atmosSwordCooldown::%player's uuid%} to now``` heres the one with fixed indenting it still has the same issue
permission: op
permission message: &cNuh uh
trigger:
give player netherite sword named "&lAtmos Sword"
on rightclick:
if name of event-item is "&lAtmos Sword":
if difference between {atmosSwordCooldown::%player's uuid%} and now is greater than 60 seconds:
message "Wait %{atmosSwordCooldown::%player's uuid%}%" to player
else:
loop all entities in radius 5 around player where [input != player]:
apply weakness 1 to loop-entity for 5 seconds
apply strength 3 to player for 3 seconds
set {atmosSwordCooldown::%player's uuid%} to now``` new problem its working i think but it is displaying a time
here is an ss
yes
because the variable is set to that timestamp
this green part is how long they have currently waited
so you get the difference between 60s and that and that should be the remaining
permission: op
permission message: &cNuh uh
trigger:
give player netherite sword named "&lAtmos Sword"
on rightclick:
if name of event-item is "&lAtmos Sword":
if difference between {atmosSwordCooldown::%player's uuid%} and now is less than or equal to 5 seconds:
message "Wait %{atmosSwordCooldown::%player's uuid%}%" to player
else:
loop all entities in radius 5 around player where [input != player]:
apply weakness 1 to loop-entity for 5 seconds
apply strength 3 to player for 3 seconds
set {atmosSwordCooldown::%player's uuid%} to now``` new version seems to work but i would like it to show a timer of the cooldown
I would just add it into the if difference between {atmosSwordCooldown::%player's uuid%} and now is less than or equal to 5 seconds: section you already have
i dont know how 🤷
send action bar "..."
wait 1 second```

permission: op
permission message: &cNuh uh
trigger:
give player netherite sword named "&lAtmos Sword"
on rightclick:
if name of event-item is "&lAtmos Sword":
while difference between {atmosSwordCooldown::%player's uuid%} and now <= 5 seconds:
send action bar "..."
wait 1 second
else:
loop all entities in radius 5 around player where [input != player]:
apply weakness 1 to loop-entity for 5 seconds
apply strength 3 to player for 3 seconds
set {atmosSwordCooldown::%player's uuid%} to now```
sorry
put that while loop iniside the if statement
.
you replaced it
ohh crap
permission: op
permission message: &cNuh uh
trigger:
give player netherite sword named "&lAtmos Sword"
on rightclick:
if name of event-item is "&lAtmos Sword":
if difference between {atmosSwordCooldown::%player's uuid%} and now is less than or equal to 5 seconds:
while difference between {atmosSwordCooldown::%player's uuid%} and now <= 5 seconds:
send action bar "..."
wait 1 second
else:
loop all entities in radius 5 around player where [input != player]:
apply weakness 1 to loop-entity for 5 seconds
apply strength 3 to player for 3 seconds
set {atmosSwordCooldown::%player's uuid%} to now``` new code nothing works
which part
hello?