ActionFlow Help

Getting Start

In this Getting Started guide, you'll learn how to set up and use Actions for the first time. Follow these steps to get up and running quickly.

Prerequisites

  • Basic understanding of JSON (JavaScript Object Notation)

  • A text editor like Visual Studio Code, Sublime Text, or even Notepad

What Makes Up an Action?

An Action is fundamentally made up of two main components:

  • type: The type of action to perform, such as repair or attack.

  • data: This is a JSON object that contains all the variable parameters that the action will use. For example, the repair action requires a repair_warp_point parameter that specifies the warp point to repair.

Step 1: Create Your First Action JSON File

Open your text editor and create a new JSON file inside the action directory. Name it my_first_action.json.

[ { "type": "repair", "data": { "repair_warp_point": "WarpPoint_1" } } ]

In this example, we're creating a repair action that will repair the warp point named WarpPoint_1.

Step 2: Save the JSON File

Save the file in the actions directory of your project.

Step 3: Trigger and Test the Action

use command to trigger the action:

actionFlow <file_name> // file_name is the name of the JSON file you created in Step 1, for example: action/my_first_action.json

Too much trouble to enter the full command every time?

Trying to customize instruction mapping
See Instruction Mapping

Stop

Use command stopAction to stop the action.

Last modified: 12 11月 2023