AFORGOTTENLEGEND'S PROFILE
Music Education student, composer, and likely alcoholic.
Search
Filter
Custom Item Menu in rm2k3
I know this topic's pretty old, but I'm hoping someone can help here. I'm trying to keep the played from moving the cursor to empty spots in the menu. So far I'm successful, but I'd like to make it so if you are changing pages it will automatically go to the closest filled item slot.
I'm using 6 item slots per page and the pages move down and up versus left and right, so if the cursor is currently in position 6, but there is no item in position 3 it will check position 2 and then position 1. Right now it only checks position 3 and I can't seem to figure out how to get it to check the other positions without lots of unnecessary code.
The way it works right now, the game first does all the work to move the cursor without moving the cursor image and then performs all the functions it would to normally select that item. If the variables return there is no item present then it returns all the variables to the last cursor position.
And that works, but I can't think of a good way to check the slots next to it. I may end up just having it default to the first slot no matter what to make things simple.
I'm using 6 item slots per page and the pages move down and up versus left and right, so if the cursor is currently in position 6, but there is no item in position 3 it will check position 2 and then position 1. Right now it only checks position 3 and I can't seem to figure out how to get it to check the other positions without lots of unnecessary code.
The way it works right now, the game first does all the work to move the cursor without moving the cursor image and then performs all the functions it would to normally select that item. If the variables return there is no item present then it returns all the variables to the last cursor position.
<>Variable Oper: [3034:itemListPtr] +, 6
<>Variable Oper: [3026:Current Page]+, 1
<>Variable Oper: [3030:Cursor]-, 3
<>Variable Oper: [3030:Cursor (y)]-, 46
<>Variable Oper: [3038:Ptr A] Set, Var [3034]'s Value
<>Variable Oper: [3038:Ptr A] +, Var [3030]'s Value
<>Variable Oper: [3039:Ptr B] Set, Var [V3038]] Value
<>Branch if Var [3039:Ptr B] is 0
<>Variable Oper: [3032:Cursor(y)]+, 46
<>Variable Oper: [3030:Cursor]+, 3
<>Variable Oper: [3034:itemListPtr]-, 6
<>Variable Oper: [3026:Current Page]-, 1
<>Jump to Label: 1
:End
And that works, but I can't think of a good way to check the slots next to it. I may end up just having it default to the first slot no matter what to make things simple.
Pages:
1














