Reference for all built-in HoloScript functions.
show objectName
hide objectName
show objectName with { duration: 500ms, easing: "ease-in" }destroy objectName
destroy objectName with { effect: "explode", delay: 1s }
spawn "TemplateName" at [x, y, z]
spawn "Enemy" at player.position with { count: 5 }clone objectName as "newName"
clone objectName at [x, y, z]animate object.property to value over duration
animate player.position to [10, 0, 0] over 2s
animate door.rotation to { y: 90 } over 1s with { easing: "ease-out" }Easing options: linear, ease-in, ease-out, ease-in-out, bounce, elastic
pulse objectName with { duration: 1000, scale: 1.2 }shake objectName with { intensity: 0.5, duration: 500ms }play_animation objectName "animationName"
play_animation character "walk" with { loop: true, speed: 1.5 }stop_animation objectName
stop_animation character "walk"play_sound "sound.mp3"
play_sound "explosion.wav" at [x, y, z]
play_sound "music.mp3" with { volume: 0.5, loop: true }stop_sound "music.mp3"
stop_all_soundsset_volume "music.mp3" to 0.5
set_master_volume 0.8apply_force object with { x: 0, y: 10, z: 0 }
apply_force object direction [0, 1, 0] magnitude 100apply_impulse object with { x: 0, y: 10, z: 0 }set_velocity object to [0, 5, 0]raycast from origin direction dir maxDistance 100
result = raycast from player.position direction player.forward
if result.hit {
hit_object = result.object
hit_point = result.point
}d = distance(objectA.position, objectB.position)
d = distance(objectA, objectB) // Shorthandvalue = lerp(start, end, t)
position = lerp(startPos, endPos, 0.5)value = clamp(input, min, max)
health = clamp(health, 0, 100)value = random() // 0 to 1
value = random(min, max) // min to max
value = random_int(1, 10) // Integer 1 to 10direction = normalize(vector)result = dot(vectorA, vectorB)
result = cross(vectorA, vectorB)value = get_state("key")
set_state("key", value)
// With object scope
value = get_state(object, "property")
set_state(object, "property", value)save_state("save_slot_1")
load_state("save_slot_1")sync object
sync object.propertybroadcast "event_name" with { data: value }send_to player_id "message" with { content: "Hello" }if is_host() {
// Host-only logic
}
if is_local(object) {
// Local player owns this
}haptic_feedback "left" 0.5 // Hand, intensity
haptic_feedback "right" 0.8 500ms // Hand, intensity, durationpos = get_controller_position("left")
pos = get_controller_position("right")pose = get_hand_pose("left")
// pose.fingers, pose.palm_position, etc.delay 1000 then {
do_something()
}
// Or as expression
await delay(1000)repeat 5 times {
spawn_enemy()
}
repeat every 1s {
update_timer()
}log "Debug message"
log "Value: " + value
log_error "Something went wrong"
log_warning "Check this"text = format("Score: {0}, Lives: {1}", score, lives)load_scene "level_2.holo"
load_scene "boss_arena" with { transition: "fade", duration: 1s }teleport_player to [x, y, z]
teleport_player to spawn_point.positionplayer = get_player()
local_player = get_local_player()
all_players = get_all_players()type = typeof(value)
// Returns: "number", "string", "boolean", "object", "array", "null"if is_number(value) { }
if is_string(value) { }
if is_array(value) { }
if is_object(value) { }