Skip to main content

Game Flow

API​

CallSuicide() -> None​

Return to the checkpoint.

CallRestart() -> None​

Restart the level.

GetSection() -> int​

Get the number of the section you're currently in.

  • returns: number of the section you're currently in

SetSection(section: int) -> None​

Set the number of the section you're currently in.

  • section: number of the section to set

SpawnVfx(vfxType: Literal, position: vec3) -> bool​

Spawn VFX.

  • vfxType: VFX type
  • position: VFX position
  • returns: whether it is spawned successfully

SpawnVfxPRS(vfxType: string, position: vec3, rotation: vec3, scale: vec3) -> bool​

Spawn VFX, with rotation and scale supported.

  • vfxType: VFX type
  • position: VFX position
  • rotation: VFX rotation, in euler angle format
  • scale: VFX scale
  • returns: whether it is spawned successfully

VFX table:

vfxTypeDescription
StartLifeStart life VFX
ExplosionExplosion VFX
SteamSteam VFX
SwitchBallPartAFirst half of the ball switch VFX
SwitchBallPartBSecond half of the ball switch VFX
CollectLifeCollect life VFX
CollectCureCollect cure VFX
CollectScoreCollect score VFX

ShowScreenEdgeFx(Type: Literal["Damaged" | "Health" | "Life" | "Score" | "Key"], intensity: float) -> None​

Show screen edge effect.

  • Type: the type of the effect
  • intensity: the intensity of the effect

ClearScreenEdgeFx(Type: Literal["Damaged" | "Health" | "Life" | "Score" | "Key" | ""]) -> None​

Clear screen edge effect.

  • Type: the type of the effect or empty string "" to clear all effects

SetCameraHeight(height: float) -> None​

Set the height of the camera.

  • height: the height of the camera

CameraShake() -> None​

Shake the camera.