Hey! I'm attempting to make a little scrolling system that uses the hotkeys/scroll wheel functions of the hotbar. Now I really want the player's selected slot to stay slot 0, but when the player scrolls to either slot 1 or slot 8, it changes the value of a variable. After every cycle to any slot other than 0, it forces the player's selected slot to return back to slot 0.
on player's held item change:
if {player_menu_active::%player%} is 1:
if player changed selected slot to 1:
add 1 to {selected_option::%player%}
set player's selected hotbar slot to slot 0 of player
if player changed selected slot to 8:
subtract 1 from {selected_option::%player%}
set player's selected hotbar slot to slot 0 of player `
This doesn't work, but its the closest I've gotten, it's only the correct conditions I'm missing
I'm aware the if statements in bold don't exist, but I'm attempting to find something that can work the same. If there's any cleaner or easily alternative to this, I'm open to any suggestions on how to make it more simple.
Any help is really appreciated. Thanks!
on player's held item change:
if {player_menu_active::%player%} is 1:
if player changed selected slot to 1:
add 1 to {selected_option::%player%}
set player's selected hotbar slot to slot 0 of player
if player changed selected slot to 8:
subtract 1 from {selected_option::%player%}
set player's selected hotbar slot to slot 0 of player `
This doesn't work, but its the closest I've gotten, it's only the correct conditions I'm missing
I'm aware the if statements in bold don't exist, but I'm attempting to find something that can work the same. If there's any cleaner or easily alternative to this, I'm open to any suggestions on how to make it more simple.
Any help is really appreciated. Thanks!