#How to stop everything on inventory close event?

1 messages · Page 1 of 1 (latest)

supple geyser
stoic finch
#

well check if player is still inside inventory

#

if not then sto

long cairn
#

Add a wait 1 tick

#

If it’s a on close

supple geyser
#

could you please show it by an example?

supple geyser
#

because i dont know I understand it well

stoic finch
#

dont just stop

#

what about the rewards

supple geyser
#

i wanna stop the animation and sound, but give player reward

#
    stop
    give {_P} {_var}```
#

so it should look like this?

stoic finch
#

no

#

bcs after stop nothing happens

#

so do it before stop

supple geyser
#

aaa fine, you're right

supple geyser
#

after

on inventory close:

#

I'm still learning, so that's why I ask those silly questions

#

This doesn't work:

    if name of player's current inventory is not "&5&l&nOtwieranie Skrzynki":
        give {_P} {_var}
        stop```
stoic finch
#

huh

#

why do u check if not

#

when u close inv the minecraft sees the player's inventory as the one before closing

supple geyser
#

oh, that makes sense

#

i did that, and it doesnt work

#
    if name of player's current inventory is "&5&l&nOtwieranie Skrzynki":
        give {_P} {_var}
        stop```
stoic finch
#

what is {_p} and what is {_var}?

#

the skript doesnt know

supple geyser
#

{_p} is player

stoic finch
#

and what are you exactly stopping

#

because it's in a seperate thing

supple geyser
stoic finch
#

u need to put it inside the function

supple geyser
#

can i stop function

stoic finch
#

to stop the code inside the function

#

no u cant

supple geyser
#

so if i cannot stop the function, how can i stop the animation which is the part of the function

#

idk my head is gonna blow up

#

thanks for your aid

#

im gonna try

stoic finch
#

you stop the function by putting "stop" INSIDE the function

supple geyser
#

okay I know to put in inside the function, but now it's time to understand where exactly hahaha

supple geyser
#

it doesn't work

#

i have no clue how to combine it with the code