Parkour

This page was last updated for version v1.2.0

Description

Creating a simple mini-game with TrParticles can be done with parkour script. This spawns Circle Particle and remembers the coordinates of spawned particles. When the player glides within those coordinates:

  • particle colors can be changed,

  • a sound can be played for the player,

  • well, any amount of any script type can be used when the player is succeeded.

This applies when a new parkour circle spawned or when the player failed too. (See below for events)

Parkour has a duration value, this duration value can change dynamically. Players must succeed in the parkour in duration seconds. A new parkour circle spawns in interval ticks. This interval can be changed dynamically too.

Dynamic change means, for instance, speeding up the parkour interval by random values becomes possible. If these variables aren't dynamic, you can only create a new parkour circle at regular intervals, like every 120 ticks. This helps make the parkour a little more interesting.

Arguments

interval

parkour interval

interval=<INTEGER>

interval=120, interval={interval}

*

*

duration

parkour duration

duration=<INTEGER>

duration=5, duration={duration}

*

*

style

circle particle preset (see below)

style=<PRESET>

style=parkour-easy

*

*

standby

stanby color scheme (see Color Format)

standby=<COLOR>

standby=#FFFFFF

*

*

success

success color scheme (see Color Format)

success=<COLOR>

success=#09b849

*

*

fail

fail color scheme (see Color Format)

fail=<COLOR>

fail=#b80909

*

*

when-succeeded

will be executed when succeeded

when-succeeded=<PRESET>

when-succeeded=parkour-success

*

*

when-fail

will be executed when failed

when-failed=<PRESET>

when-failed=parkour-fail

*

*

when-spawned

will be executed when a new parkour circle spawned

when-spawned=<PRESET>

when-spawned=parkour-spawned

*

*

when-started

will be executed when a new parkour started

when-started=<PRESET>

when-started=parkour-started

*

*

configure

will be executed before a new parkour circle spawned

configure=<PRESET>

configure=parkour

*

*

Note

The difference between when-spawned and when-started is, when-started will only be invoked when new parkour game started. But, when-spawned will always be invoked when the particles spawned.

Example

  parkour-easy:
    display-name: "Easy Parkour"
    interval: 1
    on-tick:
      handler:
        scripts:
          - "parkour [style=parkour-circle-easy,standby=#FFFFFF,success=#09b849,fail=#b80909,interval=60,duration=5,when-succeeded=parkour-success,when-failed=parkour-fail]"

Last updated