Firework Component

From wiki
Revision as of 22:48, 18 July 2017 by DeamonHunter (Talk | contribs) (Initial commit.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Category:Component Modding are all optional properties that can be added to any file. Components are useful in extending the original files with even more information, such as the cost of the item or whether the block can be broken by a weapon.

On this page, we go over the Firework component, signified by the following;

"firwork": {
  =Content=
}

Firework components are used to help out tiles that have the Firework Launcher Component. It specifies the individual rockets' properties which mainly include the explosion.


When and How to use

Firework components should be used on any item that will act as a firework. That is, most items that will be spawned by the Fireworks launcher Component.

To create this component you would use the following;

"firework": {
  "explodeEffect": "staxel.effect.generic.FireworkGreen",
  "flightEffect": "staxel.effect.generic.FireworkGreen",
  "explodeLingerTime": -1
}

There are three properties. The first, "explodeEffect" is a code to the Effect that will play when the item explodes. The second, "flightEffect" is the effect it will play while flying upwards. The third and final, is how long the explosion will last in microseconds. Leave this at -1 for the default time.

And that is all for the firework component.


Config Options

All config options must be inside the body of;

"pricing": {
  =Config Here=
}

"explodeEffect"

Valid options (String): A string containing the code to a Effect.

Default Value: No default value is specified. Always need to provide your own.


This is the effect that will play when it explodes.


"explodeLingerTime"

Valid options (Int): A positive integer number.

Default Value: -1, the default explosion time.


This is how long, in microseconds, that the explosion will stay around.


"flightEffect"

Valid options (String): A string containing the code to a Effect.

Default Value: Can be omitted.


This is the effect that will play when it flies up into the air.