rtape
Abandoned Uranium Working
Posts: 16
|
Post by rtape on Mar 29, 2018 13:34:52 GMT
I've read the instructions and searched the forum but I'm still struggling to make sense of the INV and MENU commands.
I can make a menu or inventory appear on the screen and move through the options, but how do you act upon the choice made?
e.g, inventory appears:
OPTION 1 OPTION 2 EXIT
If I select OPTION 2 how do I check and 'do option 2'?
Also, I'm using 4.7, is this still unstable with the adventure specialisation? And do I still need to be careful when making new messages?
|
|
|
Post by Doug Bagnall on Mar 29, 2018 17:24:41 GMT
The option selected is returned in the variable OPT. Not sure about the adventure specialism, and I would always be careful when doing anything. Regular backups are the order of the day
|
|
rtape
Abandoned Uranium Working
Posts: 16
|
Post by rtape on Mar 29, 2018 22:33:04 GMT
Ta. I can't find OPT in the instructions (should I be using an earlier version than 4.7?), can you give a code snippet?
For example is it:
INV 1 (prints message 1 as a selectable menu, returns after an option is selected) IF OPT 1 ..DO OPTION 1 STUFF ENDIF
I'm also not sure how the INV message can be built up and down based on objects the player has collected or dropped (the way Alessandro has done this in his masterpiece Cronopois Y Famas).
|
|
|
Post by Doug Bagnall on Mar 30, 2018 8:07:11 GMT
I haven't used these features myself. Surprisingly the manual does not mention the OPT variable. Perhaps this has now been changed? I did notice that the INV feature is only available with the puzzle specialisation. Sorry I can't be of more use.
|
|
|
Post by 10loadgameplay on Mar 31, 2018 16:38:18 GMT
I've also been trying to get INV & Menu to work, but INV corrupts the screen& crashes AGD Menu does not appear to do anything in AGD4.7: So far I have managed to create a single Message with 5 separate lines of text (Message 5) I added this into Event/Player control If key 4 Menu 5 (i.e. Message 5 with 5 separate lines of text) Redraw Endif When key 4 is pressed, the menu appears with the 5 options but I can't get any further than that! The OPT value is not updating during Menu selection - if you use Display OPT in an event it always returns zero, no matter what text selection you make. Note: This bug was previously reported byalessandro arcadegamedesigner.proboards.com/thread/477/bug-adventure-specialization
|
|
|
Post by alessandro on Apr 1, 2018 13:42:53 GMT
Happy Easter First of all, the ADVENTURE specialization in AGD 4.7 is bugged. If you wish to use the INV command you must revert to V4.6. Then you must remember that the INV and MENU commands are different things. If you want to collect, drop and use objects, you must use INV, not MENU. INV is only effective in the ADVENTURE specialization and always refers to a text message, which is invoked by the syntax: INV [message number]and contains the list of all objects in the game. Associate the inventory to a key and the game will display the list of all objects currently carried by the player. Press UP and DOWN to select an object, then FIRE to do something with it. This is the menu syntax for Cronopios Y Famas (sprite event 0): IF KEY 5 ; press 5 to display menu IF I > 0 ; I is the number of objects carried COLOUR 105 INV 5 ; 5 is the message containing the list of all objects IF OPT <> 15 ; object 15 is a "dummy" item used to exit the menu PUT OPT ; drop the object BEEP 30 SUBTRACT 1 TO I ; now you have one less object ELSE EXIT ENDIF DELAY 10 ENDIF ENDIF If you want to check the possession of an item you must use the GOT function. E.g. IF GOT [object number] ... Similarly, if you wish to "do" something with the object you own, use the OPT function. E.g. IF OPT [object number] ... For consistency reasons, be careful to list objects in the text message associated to INV in the same order of appearance of the Objects AGD menu. Taking note of each object's number and initial screen location (or 254 = object still unavailable, 255 = object already in player's inventory) will help.
|
|
rtape
Abandoned Uranium Working
Posts: 16
|
Post by rtape on Apr 2, 2018 10:01:42 GMT
Perfect Alessandro, thanks! Now I can experiment.
I remember you reporting that bug but wasn't sure if it was fixed.
|
|