• Hey! Register here to create your account, engage with the community, and talk about what is new!

Not move item in hotbar

RodaballoXD

New member
Joined
Mar 18, 2024
Messages
29
Reaction score
2
I want players to not be able to move a certain item in their hotbar and I don't know how to do that because players can just use the keys assigned to that hotbar slot with the cursor in thier inventory. Is there a way to do this?
 
Solution
Yep that is possible, first place down a Player Event - ClickInvSlot. Then place an If Game - EventItemEquals. In the chest put the item(s) you don't want players to move around. Between the brackets put a Game Action - CancelEvent.

CoderElias

Notorious member
Overlord
Joined
Jun 15, 2022
Messages
95
Reaction score
17
Yep that is possible, first place down a Player Event - ClickInvSlot. Then place an If Game - EventItemEquals. In the chest put the item(s) you don't want players to move around. Between the brackets put a Game Action - CancelEvent.
 
Solution

RodaballoXD

New member
Joined
Mar 18, 2024
Messages
29
Reaction score
2
As I said, player can use the keys assigned to the hotbar slot where the item is. I think this happens because the game uses as event item whatever is in the player's cursor.
 

RodaballoXD

New member
Joined
Mar 18, 2024
Messages
29
Reaction score
2
I just found a game value called Inventory Click Event Type, and it requires tokens to unlock. Can anyone explain what it does? Because I don't want to spend tokens if it won't solve this problem.
 

CoderElias

Notorious member
Overlord
Joined
Jun 15, 2022
Messages
95
Reaction score
17
I just found a game value called Inventory Click Event Type, and it requires tokens to unlock. Can anyone explain what it does? Because I don't want to spend tokens if it won't solve this problem.
With this you can detect which key the player presses in the event of the item. For example, if a player right clicks an item it returns with a string "right". You can use this with a If Variable block, putting the game value in the first slot and the string with the corresponding click type is the proper way to use this. And by the way, I don't really get your question: As I said, player can use the keys assigned to the hotbar slot where the item is. I think this happens because the game uses as event item whatever is in the player's cursor.
 

RodaballoXD

New member
Joined
Mar 18, 2024
Messages
29
Reaction score
2
What I mean is that what you told me in the first place doesn't work because the game doesn't recognize "Event Item" as the item that was in the hotbar but as the one with the player's cursor over it. BTW thank you very much.
 
Top Bottom