#potion effect code
1 messages · Page 1 of 1 (latest)
And please please please combine those armour change events
Then you just need an else
command /samuraichestplate:
permission:op
trigger:
give player unbreakable netherite chestplate named "&6&lSamurai &6&lChestplate" with lore "" and "&6&lAbilities:" and "&6&lLets you harness the power of fire resistance"
on armor change:
if event-item is netherite chestplate named "&6&lSamurai &6&lChestplate":
apply fire resistance to player for 10000000000000000000000000000000000000000000000000000000000 seconds
else if remove fire resistance from player Im trying to use else but it says Can't understand this effect "else"
code blocks
im really knew to skript what does that mean
and why not make one command with an argument rather than a command for each item?
" Im trying to use else but it says Can't understand this effect "else""
you need a colon, its a seciton
now it says this
elses need to go after an if, you cant use that for the first one
same thing
noo
i mean
#stuff
else if a = c:
#other```the first if statement is just `if`, then others after (below) can be `else if`s
on armor change:
if event-item is netherite chestplate named "&6&lSamurai &6&lChestplate":
apply fire resistance to player for 10000000000000000000000000000000000000000000000000000000000 seconds
else if event-item is not netheite chestplate named "&6&lSamurai &6&lChestplate":
remove fire resistance from player
code
like that?
no
you need to fix the indentation, and the ` goes before and after the code, dont just paste "```code```" after
like
```on death:
set the death message to "%victim% died"```
turns intoon death: set the death message to "%victim% died"
now its saying this
send full code
in a code block please
permission:op
trigger:
give player unbreakable netherite chestplate named "&6&lSamurai &6&lChestplate" with lore "" and "&6&lAbilities:" and "&6&lLets you harness the power of fire resistance"
on armor change:
if event-item is netherite chestplate named "&6&lSamurai &6&lChestplate":
apply fire resistance to player for 10000000000000000000000000000000000000000000000000000000000 seconds
else if:
remove fire resistance from player```
yeah its indentation
"10000000000000000000000000000000000000000000000000000000000 seconds" just do like 1 day
and that should just be an else:
although it would remove it regardless of if they are wearing other samurai armour
when I try that it says this
.
if statements open up a section, so you have to indent
Sorry for the late response its pretty much just saying this again
.
this is what happens when I try doing that