I'm trying to cancel the event where a player equips an offhand item in their inventory. I got it to work with the hotkey control, but this is simply bypassed by opening your inventory and placing the item in the slot. Anyway to cancel that event?
Here's the code I used to cancel the control:
[doublepost=1593797030,1593796228][/doublepost]Solved, I figured this out by doing:
just a little tip, %off hand item% returns as "0 air", so make sure if you use "is" you replace "air" to "0 air" for whatever your item is.
Here's the code I used to cancel the control:
Code:
on off hand switch:
cancel event
Code:
on any movement:
if "%off hand item%" does not contain "air":
add off hand item to player's inventory
set off hand item to air
just a little tip, %off hand item% returns as "0 air", so make sure if you use "is" you replace "air" to "0 air" for whatever your item is.