Skip to content

SELECT_RANDOM support #333

Open
Open

Description

@lexisother

This event/action step is currently not supported properly. Can this be added?

Activity

  1. XenonA7 commented on Aug 10, 2024

    @XenonA7

    I've also used SELECT_FIRST recently but it's quite a hassle with manual json. Can this be supported as well?

  2. Vegita2 commented on Aug 10, 2024

    @Vegita2
    Member

    Can you show an example of how it should look?

  3. XenonA7 commented on Aug 10, 2024

    @XenonA7

    Here is an example of the SELECT_FIRST event step. Although note that there is an identical action step version of it too.

    It has a list of conditions, and an event for each condition. It will execute the event corresponding to the first true condition in the "options" array. In the example, if tmp.test ==3, then the result is "This is the 3rd option.".

    {
      "0": [
        {
          "message": {
            "en_US": "This is the 1st option."
          },
          "type": "SHOW_SIDE_MSG",
          "person": {
            "person": "main.lea",
            "expression": "DEFAULT"
          }
        }
      ],
      "1": [
        {
          "message": {
            "en_US": "This is the 2nd option."
          },
          "type": "SHOW_SIDE_MSG",
          "person": {
            "person": "main.lea",
            "expression": "DEFAULT"
          }
        }
      ],
      "2": [
        {
          "message": {
            "en_US": "This is the 3rd option."
          },
          "type": "SHOW_SIDE_MSG",
          "person": {
            "person": "main.lea",
            "expression": "DEFAULT"
          }
        }
      ],
      "3": [
        {
          "message": {
            "en_US": "This is the 4th option."
          },
          "type": "SHOW_SIDE_MSG",
          "person": {
            "person": "main.lea",
            "expression": "DEFAULT"
          }
        }
      ],
      "type": "SELECT_FIRST",
      "options": [
        "tmp.test == 1",
        "tmp.test == 2",
        "tmp.test == 3",
        "tmp.test == 4"
      ]
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions