API reference
Find AeoScript and Worldkiln APIs.
Global functions
debug.logPrint values to Output.findFind named Cells, Actors, and live Entities.get_entityFind a live Entity by name.getAllCellsOfClassFind active Cells of a class.get_lightFind a Light at World coordinates.spawnCreate a live Entity at a position.waitPause this script, then continue.time.deltaRead the current frame duration.attachAttach an object to a named rig point.detachRemove an attachment and restore normal movement.
Actors and Modules
proj.findFind one authored Actor in the project hierarchy.proj.find.allFind every matching Actor in the selected scope.player.findFind one Player-attached Module.player.find.allFind all matching Player-attached Modules.scriptsLoad a reusable script Module.self.parentRead the Actor that owns this Module.player.controllerRead the enabled Player Module named controller.object.get_childrenRead the children exposed by the engine host.object.get_parentRead the parent exposed by the engine host.
Math
math.absReturn the distance of a number from zero.math.minReturn the smaller number.math.maxReturn the larger number.math.floorRound down to a whole number.math.ceilRound up to a whole number.math.roundRound to the nearest whole number.math.sqrtReturn the square root.math.powRaise a number to a power.math.sinReturn the sine of an angle.math.cosReturn the cosine of an angle.math.tanReturn the tangent of an angle.math.deg_to_radConvert degrees to radians.math.rad_to_degConvert radians to degrees.math.clampKeep a number within a range.math.lerpFind a value along the range from a to b.math.randomChoose a random number.
Basket
basket.lenCount basket elements.basket.createCreate a basket of a given length.basket.insertInsert a value, or append it at the end.basket.removeRemove an element.basket.sortSort values in ascending order.basket.clearRemove all elements.basket.findFind a value inside a basket.basket.moveCopy an inclusive range into a destination basket.basket.concatJoin basket values into text.basket.cloneCopy the outer basket.basket.freezeMake a basket read-only.
String
string.lenCount Unicode characters.string.lowerConvert text to lowercase.string.upperConvert text to uppercase.string.reverseReverse text characters.string.splitSplit text into pieces.
Cells
cell.getFind a Cell by ID.cell.existsCheck whether a Cell exists.cell.newCreate a temporary Cell.cell.deleteRemove a Cell from the active game.cell.idRead the persistent Cell ID.cell.nameRead the Cell identity name.cell.cellTypeRead the Cell type name.cell.positionRead or change a runtime-created Cell position.cell.visibleShow or hide the Cell.cell.enabledEnable or disable the Cell or Light.cell.solidControl Cell collision.cell.anchoredControl whether the Cell stays fixed.cell.colorChange the Cell color.cell.offsetChange the Cell visual offset.cell.attributesRead custom Cell values.cell.soundGet an AudioEmitter Cell sound control.light.getObjectGet the object associated with this Cell.light.is_enabledRead whether this Light is enabled.light.set_enabledChange whether this Light is enabled.
Actor handles
actor.idRead the authored Actor ID.actor.actor_idRead the authored Actor ID.actor.is_actorCheck the authored Actor kind.actor.nameRead the Actor name.actor.positionRead or change the Actor position.actor.rotationRead or change Actor rotation.actor.scaleRead or change Actor scale.actor.visibleShow or hide the Actor.actor.enabledEnable or disable the Actor.actor.packageRead the Actor package name.actor.attributesRead the Actor attributes.actor.facingRead the Actor facing direction.actor.is_validCheck whether the object still exists.actor.name()Read the object name.actor.set_positionSet the object position.actor.translateMove the object by an offset.actor.destroyDestroy the live object.actor.set_horizontal_velocitySet horizontal movement speed.actor.set_facing_directionSet the direction the Character faces.actor.select_animationChoose a Character animation.actor.is_groundedCheck whether the Character is on the ground.actor.apply_vertical_impulseApply upward or downward movement.actor.navigate_to[BETA]Ask the engine to move an Actor along a route.actor.cancel_navigation[BETA]Cancel the current navigation request.actor.is_navigating[BETA]Check whether the Actor has an active route.
Entity handles
entity.getFind a live Entity by ID.entity.existsCheck whether a runtime Entity exists.entity.is_validCheck whether the object still exists.entity.name()Read the object name.entity.set_positionSet the object position.entity.translateMove the object by an offset.entity.destroyDestroy the live object.entity.idRead the runtime Entity ID.entity.nameRead the Entity name.entity.positionRead or change Entity position.entity.velocityRead or change Entity velocity.entity.facingRead or change Entity facing.entity.groundedRead whether the Entity is on the ground.entity.animation_nameRead or select the base animation name.entity.healthRead or set current health.entity.max_healthRead or set maximum health.entity.aliveRead whether the Character is alive.entity.is_actorRead whether this Entity backs an Actor.entity.actor_idRead the authored Actor ID, if present.entity.packageRead the Character package, if present.entity.attributesRead the Entity attribute view.entity.soundGet the Entity sound capability where supported.entity.physicsGet the Entity physics controls.entity.animationGet the Entity animation controls.entity.appearanceGet the Entity appearance capability.entity.jumpMake a Character jump.entity.damageReduce Character health.entity.healRestore Character health.entity.find_pathRequest a path through the World.entity.animation.play_layerPlay an animation over part of a rig.entity.animation.entityRead the owning Entity.entity.animation.kindRead the capability kind.entity.appearance.entityRead the owning Entity.entity.appearance.kindRead the capability kind.entity.animation.is_validCheck whether the owning Entity still exists.entity.appearance.is_validCheck whether the owning Entity still exists.
UI
control.keyRead or set the Script key.control.anchorChoose the point used for layout.control.positionRead or change position in viewport pixels.control.sizeRead or change control size.control.visibleShow or hide the control.control.enabledEnable or disable interaction.control.colorRead or change the control color.control.parentChoose a parent control.control.z_indexChoose the drawing order.control.corner_radiusRound the control corners.control.border_widthChoose the border width.control.border_colorChoose the border color.control.textRead or change the label text.control.font_size[BETA]Choose the font size.control.horizontal_align[BETA]Align text horizontally.control.vertical_align[BETA]Align text vertically.control.wrap[BETA]Choose whether text wraps.control.padding[BETA]Set space around the text.control.line_spacing[BETA]Set extra space between lines.control.on_clickSet the function called when a Button is clicked.ui.findFind a UI control by Script key.ui.getFind a UI control by Script key.ui.newCreate a temporary UI control.ui.deleteRemove a control during Play.ui.get_viewport_sizeRead the playable viewport size.
Input
player.set_horizontal_velocitySet horizontal movement speed.player.set_facing_directionSet the direction the Character faces.player.select_animationChoose a Character animation.player.is_groundedCheck whether the Character is on the ground.player.apply_vertical_impulseApply upward or downward movement.input.get_move_vectorRead movement input.input.is_jump_pressedRead jump input.input.get_orbit_deltaRead camera orbit input.input.is_key_downCheck whether a physical key is held.get.mouseGet the runtime mouse controls.mouse.setCursorVisibleShow or hide the cursor.mouse.setScreenLockedLock or unlock the mouse.player.positionRead the active Player position.
Camera
camera.get_horizontal_basisRead camera-relative forward and right directions.camera.set_positionPlace the gameplay camera.camera.set_targetChoose the gameplay camera target.camera.set_orientationSet gameplay camera orientation.
Physics
physics.resolve_camera_collisionAdjust a desired camera position for collision.entity.physics.entityRead the owning Entity.entity.physics.kindRead the capability kind.entity.physics.groundedRead whether the body is grounded.entity.physics.enabledEnable or disable body simulation.entity.physics.solidChoose whether the body blocks movement.entity.physics.anchoredChoose whether the body is fixed.entity.physics.collision_enabledEnable or disable body collision.entity.physics.massSet body mass.entity.physics.velocityRead or change body velocity.entity.physics.gravity_scaleScale gravity for this body.entity.physics.sizeRead or change collider dimensions.entity.physics.is_validCheck whether the owning Entity exists.entity.physics.apply_forceApply a force to the body.entity.physics.apply_impulseApply an immediate impulse.entity.physics.stopStop the body movement.entity.physics.wakeWake a sleeping body.
Audio
sound.playingRead or change whether sound is playing.sound.loopedChoose whether the sound loops.sound.volumeRead or change sound volume.sound.playStart sound playback.sound.pausePause sound playback.sound.stopStop sound playback.
Script
script.enableEnable script execution.script.disableStop script execution and cancel its active work.script.is_enabledCheck whether a script is enabled.
Events
event.fireSend an event to matching script handlers.on_touchReact when another object starts touching this object.on_overlapReceive a supported overlap event.on.keypressReact to key press and release.navigation_finished[BETA]React when an engine-owned route completes.navigation_failed[BETA]React when navigation cannot finish.
Test
test.completeRecord the result of an in-game test.test.is_completedCheck whether a test has finished.test.passedRead a recorded test result.test.summaryRead test totals.
Save data
save.get[BETA]Read a saved value.save.set[BETA]Stage a save value in memory.save.has[BETA]Check whether a save key exists.save.remove[BETA]Stage removal of a save key.save.commit[BETA]Write staged save changes to disk.
Particles
particles.burst[BETA]Create a burst of temporary particles.particles.set_enabled[BETA]Enable or disable a ParticleEmitter Cell.particles.count[BETA]Count active particles.particles.clear[BETA]Remove all active particles.
Engine internals
- Runtime and waiting
How Worldkiln runs and pauses script work.
- Engine host
How scripts reach engine-owned objects.
- Physics architecture
How simulation and script controls fit together.
- Persistence [BETA]
Keep authored content, runtime changes, and save data separate.
[BETA] marks features newer than the current public release. Current release: 0.8.0.