#Clear effects

1 messages · Page 1 of 1 (latest)

void musk
#

Hey! So basically im trying to add a /freeze command to my server. I already added the /freeze command and it works perfectly, however with the /unfreeze command I am not sure how to clear effects. (I tried to do - values to maybe try and remove it but that didnt do anything.)

void musk
#

man im new to skript

#

i dont know how to clear certain effects with a command

#

basically

spice veldt
#

You can clear the effect with a command

void musk
#

yeah but like to make it automatic

#

like with the /unfreeze command i'd like to do it

#

i know i can just do /effect clear name effect

#

but is there a way to do it with a custom command?

spice veldt
#

yeah just make the console execute that command

#

execute console command "/effect blabla"

void musk
#

oh

#

okay thank you

spice veldt
#

Did you get it to work?

void musk
#

works fully )

#

:)*

#

thank you very much

spice veldt
#

No problem

sweet lynx
#

tell me you aren't good without telling me

#

don't use console commands in skript, 99% of the time its not needed at all

spice veldt
#

oh really?

#

their a new skripter, they need simple solutions

sweet lynx
#

yes they need good ones and good tips

spice veldt
#

go ahead then

sweet lynx
#

this is one way

remove slowness from player
remove jump boost from player```
#

this is another way

clear all the potion effects of player```
#

@void musk Use my examples, don't use console commands

void musk
#

o

#

alright thank you

sweet lynx
#

np

void musk
#

is there something called like

sweet lynx
#

I also recommend using https://skripthub.net/docs/
Its a great site for beginners to learn skript

void musk
#

set player's health to 20?

sweet lynx
#

yes

void musk
#

oh i use that sometimes

#

oh

#

whats the uhh

#

how do i do it?

#

cuz for the heal command i just gave instant health

#

i mean it works but i think it could be better

sweet lynx
#

this is a way

set player's health to 20 hearts```
void musk
#

wont work?

sweet lynx
void musk
#

oh

#

okay

sweet lynx
#

or 20hp

void musk
#

thank you :)

sweet lynx
#

np

#

you can also set max health

void musk
#

oh that i know

sweet lynx
#

set player's max health to 50

void musk
#

i saw when i was trying to search up heal on the website

#

okay thank you

sweet lynx
#

ah nice

#

if you need help you could always ping or dm me

rare rune
#

you can clear specific effect from a player

sweet lynx
kind dagger
#

or

#
    trigger:
        set {freeze::%arg's uuid%} to true
    
on move:
    if {freeze::%player's uuid%} is true:
        cancel event```

do somethiing like this
#

create a /unfreeze command and set {freeze::%arg-1's uuid%} to false

hexed geyser
#

^, but with a metadata tag
also, on move: accounts for yaw/pitch changes too, so it gets triggered a lot and might be laggy. i would use on player step: instead

sweet lynx
#

also isn't it on player move and not on move

hexed flicker
#

wiggity wah