#{RESOLVED} detecting crouching while holding an item
1 messages · Page 1 of 1 (latest)
by activate i mean im holding the item and i crouch and then it does the rest of the script yk yk
The content log gives you live feedback for most errors that could occur while developing your add-on.
In Minecraft:
- Go to settings
- In the General section, select "Creator"
- Enable Content Log GUI
For more information:
https://wiki.bedrock.dev/guide/troubleshooting.html#content-log
Do world.afterEvents.ItemUse
Then ask if the player is sneaking and the item stack is equal to the item you want to work with sneaking plus use
wait so I didnt mention something which is I have another ability set up in the script which is just "world.afterEvents.itemUse" then I want the other ability on the script to be activated using crouch while holding the item. So using your method it wont activate the other ability?
sorry if that was hard to understand
It won't u can ask inside that same wiuld.afterEvents.itemUse something like
if(item.TypeId === "youitem" && isSneaking)
As long as the item in there is checking the TypeId it won't collide
ok thanks