Skip to content

ChangeWorldAction ​

Inherits: EventAction < Resource

Action for changing the current map while preserving game session state. Uses GameHost's new map transition system for seamless transitions.

Properties ​

intworld_id0
SpawnTypespawn_typeSpawnType.DEFAULT
intrabbit_hole_id0
Vector3spawn_positionVector3.ZERO
Vector3spawn_rotationVector3.ZERO
boolwait_for_completiontrue

Variables ​

booltransition_startedfalse
booltransition_completedfalse

Methods ​

Stringget_display_name()
Stringget_function_description()
Dictionaryget_spawn_type_options()
voidcleanup()
Dictionarysave()
voidload_data( data: Dictionary )

Enumerations ​

enum SpawnType ​

The options of spawn type: default, rabbit hole, exact position.

  • DEFAULT = 0 - Use map's default spawn point
  • RABBIT_HOLE = 1 - Spawn at specific rabbit hole
  • EXACT_POSITION = 2 - Spawn at exact coordinates

Property descriptions ​

int world_id = 0 ​

ID of the target map to transition to

SpawnType spawn_type = SpawnType.DEFAULT ​

How the party should be positioned in the new map

int rabbit_hole_id = 0 ​

ID of rabbit hole to spawn at (for RABBIT_HOLE spawn type)

Vector3 spawn_position = Vector3.ZERO ​

Exact position to spawn at (for EXACT_POSITION spawn type)

Vector3 spawn_rotation = Vector3.ZERO ​

Rotation for exact position spawning

bool wait_for_completion = true ​

Whether to wait for transition completion before completing action

Variable descriptions ​

bool transition_started = false ​

Internal state

bool transition_completed = false ​

True once the change of map is done (the action waits for it).

Method descriptions ​

String get_display_name() ​

Return the display name of this Action

String get_function_description() ​

Return a description of this action with parameter placeholders

Dictionary get_spawn_type_options() ​

Helper function to get spawn type options

void cleanup() ​

Clean up resources

Dictionary save() ​

Save action state to a dictionary

void load_data( data: Dictionary ) ​

Load action state from a dictionary