This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| dragengine:modules:dragonscript:gabehavior_statemachine [2026/10/15 19:44] – created dragonlord | dragengine:modules:dragonscript:gabehavior_statemachine [2026/10/16 01:18] (current) – [windowGameWorld.update] dragonlord | ||
|---|---|---|---|
| Line 45: | Line 45: | ||
| * Default Value: < | * Default Value: < | ||
| * Example (*.deeclass) <code xml>< | * Example (*.deeclass) <code xml>< | ||
| - | |||
| - | ====== Events ====== | ||
| - | |||
| - | This behavior runs these state machine events. | ||
| - | |||
| - | ===== initGame ===== | ||
| - | |||
| - | Run after all game app behaviors have initialized. | ||
| - | |||
| - | ===== servicesInitialized ===== | ||
| - | |||
| - | Run once when all game service initialization has finished. | ||
| - | |||
| - | ===== update ===== | ||
| - | |||
| - | Run every frame. The event parameter is the elapsed time in seconds. | ||
| - | |||
| - | ===== appActivated ===== | ||
| - | |||
| - | Run when the application window has been activated. | ||
| - | |||
| - | ===== appDeactivated ===== | ||
| - | |||
| - | Run when the application window has been deactivated. | ||
| ====== Actions ====== | ====== Actions ====== | ||
| Line 141: | Line 117: | ||
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| |visible|'' | |visible|'' | ||
| + | |cameraDirector|'' | ||
| + | * '' | ||
| + | </ | ||
| + | |cameraDirector.loadCamera|string|Load camera parameters from '' | ||
| + | |cameraDirector.pivot|vector|Rotation point.| | ||
| + | |cameraDirector.pivot.aboveGround|float|Pivot point at desired distance above ground.| | ||
| + | |cameraDirector.localMatrix.position|vector|Position part of local matrix.| | ||
| + | |cameraDirector.localMatrix.rotation|vector|Rotation part of local matrix. Rotation is in degrees.| | ||
| + | |cameraDirector.azimuth|float|Vertical rotation.| | ||
| + | |cameraDirector.azimuth.lock|'' | ||
| + | |cameraDirector.elevation|float|Horizontal rotation.| | ||
| + | |cameraDirector.elevation.lock|'' | ||
| + | |cameraDirector.distance|float|Distance.| | ||
| + | |cameraDirector.useOrientation|'' | ||
| + | |cameraDirector.bone|string|Name of bone to use as rotation point. Requires [[behavior_component|ECBehaviorComponent]] to be present.| | ||
| This is an example of using this action to hide the WindowGameWorld: | This is an example of using this action to hide the WindowGameWorld: | ||
| Line 154: | Line 145: | ||
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| + | |addBehavior|string|Create game world behavior from named game world behavior factory and add it to active game world.| | ||
| + | |addBehavior.id|string|Identifier to use for '' | ||
| + | |createElement|string|Create element with value named element class and add it to the active game world.| | ||
| + | |createElement.spawn|string|Name of spawn point to spawn element at.| | ||
| + | |clearWorld| |Clear the active game world if present.| | ||
| + | |loadWorld|string|Start loading world from '' | ||
| + | |loadWorld.enableNetworking|'' | ||
| + | |loadWorld.ignorePersistableElements|'' | ||
| |runEvent|string|Run event on [[gwbehavior_btsm|GWBehaviorBTSM]] in the active game world. This allows application state machine to interact with element behavior state machines inside the game world.| | |runEvent|string|Run event on [[gwbehavior_btsm|GWBehaviorBTSM]] in the active game world. This allows application state machine to interact with element behavior state machines inside the game world.| | ||
| Line 238: | Line 237: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ====== Events ====== | ||
| + | |||
| + | This behavior runs these state machine events. | ||
| + | |||
| + | ===== initGame ===== | ||
| + | |||
| + | Run after all game app behaviors have initialized. | ||
| + | |||
| + | ===== servicesInitialized ===== | ||
| + | |||
| + | Run once when all game service initialization has finished. | ||
| + | |||
| + | ===== update ===== | ||
| + | |||
| + | Run every frame. The event parameter is the elapsed time in seconds. | ||
| + | |||
| + | ===== appActivated ===== | ||
| + | |||
| + | Run when the application window has been activated. | ||
| + | |||
| + | ===== appDeactivated ===== | ||
| + | |||
| + | Run when the application window has been deactivated. | ||
| + | |||
| + | ===== windowGameWorld.loadWorld.finished ===== | ||
| + | |||
| + | Loading game world started by '' | ||
| + | |||
| + | ===== windowGameWorld.loadWorld.failed ===== | ||
| + | |||
| + | Loading game world started by '' | ||
| + | |||
| + | ====== Required Behaviors ====== | ||
| + | |||
| + | This behavior requires no other behaviors. | ||
| + | |||
| + | ====== Optional Behaviors ====== | ||
| + | |||
| + | This behavior does not support optional behaviors. | ||
| + | |||
| + | ====== API Documentation ====== | ||
| + | |||
| + | # | ||
| + | |||
| + | Since DragonScript Module Version '' | ||
| + | |||
| + | ====== Use Cases ====== | ||
| + | |||
| + | * Drive higher level application logic using state machine. | ||
| + | * Drive UI interaction using state machine. | ||
| + | |||
| + | ====== Live Examples ====== | ||
| + | |||
| + | * [[https:// | ||