Skip to content

Emitters

fenix31415 edited this page Jan 7, 2024 · 8 revisions

It is possible to call a function every time interval. At the moment, you can change the projectile speed, as well as call all the functions from the Triggers section. You cannot perform two functions at different time intervals. At the moment, each projectile can perform one function once in a specified amount of time.

EmittersData

This is a map where keys are strings (starting with key_) and values are instances of settings for this feature. The key identifies the settings instance. In the Triggers section, you can specify the instance of settings you need using this key.

An instance of settings is an object with the following fields.

  • interval: function call interval.
  • limited: does number of calls is limited (default: false). If true, use following keys to configure:
    • count: a number of calls (default: 1).
    • destroyAfter: whether to destroy the projectile after the last call (default: false).
  • functions: a functions to call.

Emitter Functions

In this array of objects you can specify the functions you want to perform on projectile. In the "type" field set the type of function. The field has the following values.

  • TriggerFunctions: the function calls triggers. In field TriggerFunctions you can set them.
  • AccelerateToMaxSpeed: the function accelerates projectile from current to max speed.
    In field time you can set the time to accelerate from the current speed to the max speed; in field speedType set the type of acceleration.

Example

"EmittersData": {
  "key_EM_1": {
    "limited":true,
    "count": 2,
    "destroyAfter": true,
    "interval": 2,
    "functions": [
      {
        "type": "TriggerFunctions",
        "TriggerFunctions": {
          "functions": [
            {
              "type": "ApplyMultiCast",
              "id": "key_MC_1"
            }
          ]
        }
      }
    ]
  }
}
Clone this wiki locally