EdD
Wacky Amoebatron
Posts: 34
|
Post by EdD on Mar 11, 2024 23:59:01 GMT
¿Alguna forma de tener más opciones en el menú principal? Is there any way to have more options on the main menu? 1..Keyboard
2..Kempton
3..Sinclair 4..Redefine
5..?
Gracias
|
|
|
Post by ramon on Mar 12, 2024 8:03:46 GMT
Try to use MENU comand:
MENU "Option1,Option2,Option3,Option4,Option5"
Saludos!
|
|
EdD
Wacky Amoebatron
Posts: 34
|
Post by EdD on Mar 12, 2024 9:37:37 GMT
La verdad que es una idea, pero no me gusta para el menu de inicio lo de elegir subiendo y bajando por las opciones, más me refiera a esto:
WHILE CONTROL 99 ;Menu
IF KEY OPTION1
LET CONTROL 0
ENDIF
IF KEY OPTION2
LET CONTROL KEMPSTON
ENDIF
IF KEY OPTION3
LET CONTROL SINCLAIR
ENDIF ; redefine keys
IF KEY OPTION4
WHILE KEY OPTION4
ENDWHILE
poner una IF KEY OPTION5, o si presionas la tecla 5 que pase algo dentro del menu de inicio.
Gracias
|
|
mas
Processing Plant
Posts: 28
|
Post by mas on Mar 12, 2024 12:46:28 GMT
On my last game I used the OPTION keys to cycle (and then KEY FIRE to start the game) So OPTION1 cycled through Keyboard, Kempston and Sinclair
;; menu options
IF KEY OPTION1 ; control method WHILE KEY OPTION1 ENDWHILE IF CONTROL = 2 LET CONTROL = 0 ELSE ADD 1 TO CONTROL ENDIF ENDIF
And then you need a bit of a more involved sequence for the display - mine was something like:
GETRANDOM 8 INK 7 AT 8 2 PRINT "1. Control" AT 9 2 IF CONTROL = 0 PRINT "KEYBOARD" INK RND PRINT ".KEMPSTON.SINCLAIR." ENDIF IF CONTROL = 1 INK 7 PRINT "KEMPSTON" INK RND PRINT ".SINCLAIR.KEYBOARD" ENDIF IF CONTROL = 2 INK 7 PRINT "SINCLAIR" INK RND PRINT ".KEYBOARD.KEMPSTON" ENDIF
which should make the selected option colour cycle to highlight
But that's 3 options compressed to 1 option button. I Like the idea of using a MENU though.
I did then have to have something other than the WHILE CONTROL 99 LOOP around the whole thing; in my case it was waiting for the KEY FIRE to be selected.
Good luck!
|
|
EdD
Wacky Amoebatron
Posts: 34
|
Post by EdD on Mar 12, 2024 16:51:02 GMT
On my last game I used the OPTION keys to cycle (and then KEY FIRE to start the game) So OPTION1 cycled through Keyboard, Kempston and Sinclair ;; menu options IF KEY OPTION1 ; control method WHILE KEY OPTION1 ENDWHILE IF CONTROL = 2 LET CONTROL = 0 ELSE ADD 1 TO CONTROL ENDIF ENDIF And then you need a bit of a more involved sequence for the display - mine was something like: GETRANDOM 8 INK 7 AT 8 2 PRINT "1. Control" AT 9 2 IF CONTROL = 0 PRINT "KEYBOARD" INK RND PRINT ".KEMPSTON.SINCLAIR." ENDIF IF CONTROL = 1 INK 7 PRINT "KEMPSTON" INK RND PRINT ".SINCLAIR.KEYBOARD" ENDIF IF CONTROL = 2 INK 7 PRINT "SINCLAIR" INK RND PRINT ".KEYBOARD.KEMPSTON" ENDIF which should make the selected option colour cycle to highlight But that's 3 options compressed to 1 option button. I Like the idea of using a MENU though. I did then have to have something other than the WHILE CONTROL 99 LOOP around the whole thing; in my case it was waiting for the KEY FIRE to be selected. Good luck! Well, it's an idea, although I thought it would be easier to add one more option to the menu. What you're suggesting could be good. Thank you very much.
|
|
mas
Processing Plant
Posts: 28
|
Post by mas on Apr 24, 2024 11:30:26 GMT
It's a bit late for this reply (a month and a bit late) but there is another way. The valid keyboard definitions are UP, DOWN, LEFT, RIGHT, FIRE1, FIRE2, FIRE3, OPTION1, OPTION2, OPTION3, OPTION4 If your game is only using 3-5 keys (Say LEFT, RIGHT, FIRE1 and maybe UP, DOWN - which would be typical for a platformer) then you have FIRE2 and FIRE3 to use for Options 5 and 6; just define them in the Keyboard definition screen. If I'd thought of that a couple of months ago, I would have been released I could have defined FIRE1 FIRE2 and FIRE3 as 5,6 and 7 rather than going down the "selects from a list" idea I'd had. I might have still gone that way, but it would have been a simpler and memory saving "hack" :-) It would turn your original code into: WHILE CONTROL 99 ;Menu IF KEY OPTION1 LET CONTROL 0 ENDIF IF KEY OPTION2 LET CONTROL KEMPSTON ENDIF IF KEY OPTION3 LET CONTROL SINCLAIR ENDIF ; redefine keys IF KEY OPTION4 WHILE KEY OPTION4 IF KEY FIRE2 ;; option5 ;; whatever option 5 triggers ENDIF IF KEY FIRE3 ;; option6 ;; whatever option 6 triggers ENDIF
ENDWHILE
|
|