Can you create lists in online editor?

I want to display a menu in response to a player action, when I use the 'show menu' function it asks for 'options from list/dictionary. How/where do I create the list?


Easiest way is the Split function. In code, like this:

list = Split("First option;Second;Third one", ";")

Thanks, but where do I do this? In the online editor when I create display a list I get the following fields to complete:

Show menu with caption [text] [ ]
Options from list/dictionary [ ]
Allow player to ignore the menu [yes]
After choosing run script.....

What do I put in the options from list/dictionary, and where do i create the list?

Apologies for my ignorance!


At the bottom, click on Code View. You will see some like this:

ShowMenu("Some title", list, false) {

The line goes at the top:

list = Split("First option;Second;Third one", ";")
ShowMenu("Some title", list, false) {

When you close the Code Voew dialog, that will be converted to the GUI view. If you are still struggling, paste everything from the Code view into your post.


Thanks again, will try that


I decided on a different solution to my problem, but thanks very much for your help


you can also put the list items directly into ("in-line") the 'show menu / ShowMenu' Functions, if you just want to work with your 'show menu / ShowMenu' Script:

('show menu' does the popup menu window, 'ShowMenu' does the "in-line" text/hyperlink menu)

show menu ("prompt", split ("item1; item2;item3", ";"), true/false) { /* scripting */ }
or
ShowMenu ("prompt", split ("item1; item2;item3", ";"), true/false) { /* scripting */ }

though, it is easier on people to have it separated into it's own line (as Pixie shown) and for some other possible reasons too.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums