Hello, I'm very new to pico-8 (and fairly inexperienced with coding in general) and I need a bit of help with some menu code. I'd like to have a menu that has two sections to it that you can move between with the left and right arrows. I'm working off of pixelcod's menu code example, here is what I have so far:
--menu system
function init_menu()
menu={"menu1","menu2"}
menu.y=12
menu1 = {}
menu1.x=25
menu1.options={"πΈπ’ππ¬","π΅π’ππ¬","π΅π’π¬π¦","π¨πͺπ·π¦","πͺπ―π·."}
menu2 = {}
menu2.x=88
menu2.options={"πΈπ©π’π±","π¬πͺπ΄π΄","π₯πͺπ΄π΄","π§π³π¦π΅","π΄π΅π―πΊ"}
menu.amt=0
menu.sel=1
menu.swp=false
for i in all(menu1.options,menu2.options) do
menu.amt+=1
end
end
function update_menu()
update_cursor()
end
function draw_menu()
for i=1,menu.amt do
oset=i*8
end
if menu.swp==true then
if i==menu.sel then
spr(39,menu2.x,menu.y+oset,2,1)
print(menu2.options[i],menu2.x,menu.y+oset+1,10)
[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=174261#p) |

Hello, this is my first pico-8 game, Rolling Bones! In it, you are a skull who wants to go out on a date, but all your bones have been scattered to the winds! Roll around the field to find them but watch out for assorted junk! Sticks and stones can break your bone and other items can look like bones but will not fit anywhere in your skeleton (I promise, I've tried). Can you collect all 20 bones to get ready for your big date?






3 comments