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

Arg

interval

Description

parkour interval

Format

interval=<INTEGER>

Example(s)

interval=120, interval={interval}

Default Value

*

Required
Aliases

*

Arg

duration

Description

parkour duration

Format

duration=<INTEGER>

Example(s)

duration=5, duration={duration}

Default Value

*

Required
Aliases

*

Arg

style

Description

circle particle preset (see below)

Format

style=<PRESET>

Example(s)

style=parkour-easy

Default Value

*

Required
Aliases

*

Arg

standby

Description
Format

standby=<COLOR>

Example(s)

standby=#FFFFFF

Default Value

*

Required
Aliases

*

Arg

success

Description
Format

success=<COLOR>

Example(s)

success=#09b849

Default Value

*

Required
Aliases

*

Arg

fail

Description
Format

fail=<COLOR>

Example(s)

fail=#b80909

Default Value

*

Required
Aliases

*

Arg

when-succeeded

Description

will be executed when succeeded

Format

when-succeeded=<PRESET>

Example(s)

when-succeeded=parkour-success

Default Value

*

Required
Aliases

*

Arg

when-fail

Description

will be executed when failed

Format

when-failed=<PRESET>

Example(s)

when-failed=parkour-fail

Default Value

*

Required
Aliases

*

Arg

when-spawned

Description

will be executed when a new parkour circle spawned

Format

when-spawned=<PRESET>

Example(s)

when-spawned=parkour-spawned

Default Value

*

Required
Aliases

*

Arg

when-started

Description

will be executed when a new parkour started

Format

when-started=<PRESET>

Example(s)

when-started=parkour-started

Default Value

*

Required
Aliases

*

Arg

configure

Description

will be executed before a new parkour circle spawned

Format

configure=<PRESET>

Example(s)

configure=parkour

Default Value

*

Required
Aliases

*

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