Module FireworksUnit

A unit capable to launch fireworks that are stored in the attached container.

Element class: FireworksUnit

Extends: Element

Functions

activate () Deprecated: Fire the firework.
fire () Fire the firework.
setExplosionDelay (delay) Set the delay before the launched firework explodes.
getExplosionDelay () Returns the delay before the launched firework explodes.
setLaunchSpeed (speed) Set the speed at which the firework will be launched (impacts its altitude, depending on the local gravity).
getLaunchSpeed () Returns the speed at which the firework will be launched.
setType (type) Set the type of launched firework (will affect which firework is picked in the attached container).
getType () Returns the type of launched firework.
setColor (color) Set the color of the launched firework (will affect which firework is picked in the attached container).
getColor () Returns the color of the launched firework.
setSignalIn (plug, state) Set the value of a signal in the specified IN plug of the element.
getSignalIn (plug) Return the value of a signal in the specified IN plug of the element.
EVENT_onFired () Event: Emitted when a firework has just been fired.


Functions

activate ()
Deprecated: Fire the firework.

This method is deprecated: fire should be used instead

See also:

fire ()
Fire the firework.
setExplosionDelay (delay)
Set the delay before the launched firework explodes.

Parameters:

  • delay float The delay before explosion in seconds (minimum 2, maximum 5).
getExplosionDelay ()
Returns the delay before the launched firework explodes.

Returns:

    float The delay before explosion in seconds.
setLaunchSpeed (speed)
Set the speed at which the firework will be launched (impacts its altitude, depending on the local gravity).

Parameters:

  • speed float The launch speed in m/s (minimum 50, maximum 200).
getLaunchSpeed ()
Returns the speed at which the firework will be launched.

Returns:

    float The launch speed in m/s.
setType (type)
Set the type of launched firework (will affect which firework is picked in the attached container).

Parameters:

  • type int The type index of the firework (Ball = 1, Ring = 2, Palmtree = 3, Shower = 4).
getType ()
Returns the type of launched firework.

Returns:

    int The type index of the firework (Ball = 1, Ring = 2, Palmtree = 3, Shower = 4).
setColor (color)
Set the color of the launched firework (will affect which firework is picked in the attached container).

Parameters:

  • color int The color index of the firework (Blue = 1, Gold = 2, Green = 3, Purple = 4, Red = 5, Silver = 6).
getColor ()
Returns the color of the launched firework.

Returns:

    int The color index of the firework (Blue = 1, Gold = 2, Green = 3, Purple = 4, Red = 5, Silver = 6).
setSignalIn (plug, state)
Set the value of a signal in the specified IN plug of the element.

Valid plug names are:

  • "in" for the in signal (seems to have no actual effect when modified this way).

Parameters:

  • plug string A valid plug name to set.
  • state 0/1 The plug signal state
getSignalIn (plug)
Return the value of a signal in the specified IN plug of the element.

Valid plug names are:

  • "in" for the in signal.

Parameters:

  • plug string A valid plug name to query.

Returns:

    0/1 The plug signal state
EVENT_onFired ()
Event: Emitted when a firework has just been fired.

Note: This is documentation on an event handler, not a callable method.

generated by LDoc 1.5.0 Last updated 2023-09-04 19:09:50