#when unequipping armor execute a command
1 messages · Page 1 of 1 (latest)
You can add a tag to the player when it has the item equipped. Then, when the player unequips it, you run your command and remove the tag.
I didn't understand what you meant
I don't know how to check if the item has been unequipped and execute a command if it has been unequipped
hasitem filter.
in commands.
or !q.is_item_name_any if you're using animation controllers.
I'm pretty sure has item supports ! just like all the other target selectors. For example:-
/tag @s[tag=!tagged] add tagged
will add tag 'tagged' to me if I don't already have the tag 'tagged'.
or you can also use execute unless in case it doesn't supports it.
I know that, but I'm trying to understand how I would check that the person took off the armor? And I would take away the Egypts
.
While the player has the tag, you can keep checking if the armor is still present. If it is not, you can execute your desired commands and remove the tag.
How would I check if the item is equipped?
That's what I don't know
hasitem.
But how??