#how to check i a player is sneaking for 3 seconds
1 messages · Page 1 of 1 (latest)
ok
look i tell you
player is sneaking
if player's held item is {giantsword}:
set {sneak::%player's uuid%} to now
if the difference between {sneak::%player's uuid%} and now = 1 second:
send action bar "&a&l▌" to player for 1 second
wait 1 second
if the difference between {sneak::%player's uuid%} and now = 2 second:
send action bar "&a&l▌▌" to player for 1 second
wait 1 second
if the difference between {sneak::%player's uuid%} and now = 3 second:
send action bar "&a&l▌▌▌" to player for 1 second
wait 1 second
if the difference between {sneak::%player's uuid%} and now = 4 second:
send action bar "&a&l▌▌▌▌" to player for 1 second
wait 1 second
if the difference between {sneak::%player's uuid%} and now = 5 second:
send action bar "&a&l▌▌▌▌▌" to player for 5 second
set {giantablity::%player's uuid%} to true
```
error : won't understand this condtion if the difference between {sneak::%player's uuid%} and now = 1 second:
You don’t use = in skript use is
Yeah instead of =
You get confused with other languages I’m guessing it happens to me a lot
still eror
Which is?
Ok I think so set a new variable like this and check that var
set {_diff} to difference between {_var1} and {_var2}
Beacuse somethings with like if players tool is diamond with name “test”
Is funny like that as that don’t work when it should
I'll revise your Skript to fix errors and make it cleaner. It's a bit of a mess.
It’s just something I’m saying
trigger:
set {%arg%} to player's held item```
But try what I said and do what vec said as well
Yeah I don’t need it I was just saying it’s like that
so first var1 is the {sneak::%player's uuid%} and second var is to set it to not
and to set {_diff} to the diffrence
?
Ohh didn’t see your skript right one sec
Somthing like this
set {_difference} to difference between {var-1} and now
And then check that variable
on sneak toggle:
if player is sneaking and player's held item is {giantsword}:
set {sneak::%player's uuid%} to now
wait 1 second
if player is sneaking and player's held item is {giantsword}:
send action bar "&a&l▌" to player for 1 second
wait 1 second
if player is sneaking and player's held item is {giantsword}:
send action bar "&a&l▌▌" to player for 1 second
wait 1 second
if player is sneaking and player's held item is {giantsword}:
send action bar "&a&l▌▌▌" to player for 1 second
wait 1 second
if player is sneaking and player's held item is {giantsword}:
send action bar "&a&l▌▌▌▌" to player for 1 second
wait 1 second
if player is sneaking and player's held item is {giantsword}:
send action bar "&a&l▌▌▌▌▌" to player for 5 seconds
set {giantability::%player's uuid%} to true
Combined the player is sneaking and if player's held item is {giantsword} conditions into a single if statement to reduce redundancy and improve readability.
Removed the comparisons between {sneak::%player's uuid%} and now since the wait effects are used for delaying the action bar messages. Instead, I added extra conditions to check if the player is still sneaking and holding the {giantsword} item after each wait effect. This ensures that the ability activation process is interrupted if the player stops sneaking or switches items during the countdown.
Fixed a typo in the variable name giantablity to giantability.
first var {sneak::%player's uuid%} is set to now?
holly gagamolly

if player is sneaking and player's held item is {giantsword}:
My fault, made a mistake in the syntax. Use if and and to combine the conditions properly.
Gotta say you got lucky avocado not a lot of people would do that 😂
😄
ohhh
what is sponnfead?
like sending them the skript
and not making them do that

No worries
how'd you know
