Weather module

The runtime weather effect the current level shows.

Properties

  • trx.weather.current (trx.weather.Type). The active weather. (read-only)

  • trx.weather.severity (number). How heavy the weather falls, as a multiple of the number of particles the original games show. 1 is that number, 0 leaves the sky clear, and 4 is as much as the particle pool holds; a value outside the range is clamped to it.

    A level starts at 1, and a savegame carries what it was saved with.

Enums

  • trx.weather.Type

    The kinds of weather a level can show.

    • trx.weather.Type.NONE = 0
      Clear.
    • trx.weather.Type.RAIN = 1
      Rain.
    • trx.weather.Type.SNOW = 2
      Snow.

Functions

  • trx.weather.set(type)
    Sets the active weather.

    Parameters:

    Example:

    trx.weather.set(trx.weather.Type.SNOW)