|
Post by thelonemagpie on Mar 10, 2020 17:18:41 GMT
All I require is a few lines of text, ie
SELECT DIFFICULTY 1. REVIEWER 2. OLD SCHOOL
with option 1 giving infinite lives and a bog standard text ending, and option 2 giving 3 lives but an actual animated ending. The lives bit is easy, but I'm struggling to make the actual selection screen. Would I need to use the first level/screen for this? Or is it possible to use the CONTROLMENU screen for it?
|
|
|
Post by alessandro on Mar 10, 2020 23:19:06 GMT
The CONTROLMENU command only lets the player select the control method. It has no impact on the flow of the game whatsoever. If you do not plan to create a menu program outside of the AGD-authored game (which would be the wisest choice ) you can assign the last two keys to 1 and 2 respectively, provided your game does not need more keys than the canonical five (directions and fire). You could then assign a variable according to the pressed key in the Intro/menu event, which would be used to set the number of lives and the game ending. For example, and assuming KEY 5 is assigned to 1 and KEY 6 is assigned to 2, it would be something like this, after you print the two messages, each one with the respective choice: WAITKEY IF KEY 5 LET A 1 ELSE LET A 2 ENDIF This way, any defined key other than 1 would set the proper difficulty. It is not possible to bind the second option to KEY 6 because there is no way to control the flux of the menu, like you would in BASIC with a GO TO instruction which goes back to the start if another key other than KEY 5 or KEY 6 is pressed. At this point, A can be either 1 or 2. In the Game Initialization event, write: LET LIVES 3 [or any other value] and in the Kill player event (if you use the KILL command), put: IF A = 2 SUBTRACT 1 TO LIVES ENDIF
so that one life will be subtracted only when A = 2. Similarly, in the Completed game event: IF A = 2 [insert your ending script here] ENDIF
Remember not to alter the value of A (or any other variable you choose for this purpose) in any way after the player chooses the difficulty at the start.
|
|