SceneExit

One way out of a scene: an area, and the scene (and args) walking into it changes to - see BGE.SceneExits. Subclass it and override isTriggeredBy() for another condition, e.g. only on a button press, or while a door is unlocked.

Properties

  • area (BGE.ExitArea)
  • sceneName (string)
  • args (roAssociativeArray) — Passed to the next scene, e.g. {spawn: "gate"} for its BGE.SpawnPoints
  • enabled (boolean) — A disabled exit is never taken by SceneExits.update()
  • fadeSeconds (float) — Each half of the fade; 0 or less changes scene straight away

Constructor

new SceneExit( area: BGE.ExitArea, sceneName: string, args?: roAssociativeArray, ): SceneExit

Parameters

  • area (BGE.ExitArea)
  • sceneName (string)
  • args (roAssociativeArray, optional, default: "{}")

Instance Methods

isTriggeredBy(position: BGE.Math.Vector): boolean

Whether SceneExits.update() takes this exit for a position: by default, when it's enabled and the position is in its area.

Parameters

  • position (BGE.Math.Vector)

Returns

  • boolean