Skip to main content

Animal Track

Based on game build 714014 | Last updated: 2026-03-04

Overview

animal_track is a lightweight prefab that visually represents an animal track on the ground. It is used to indicate recent animal activity (e.g., koalefant, lightning goat, warg). The track appears as a static animation and automatically fades out and removes itself after 15 seconds. It is only instantiated on the master simulation and does not persist across sessions.

Usage example

-- Example usage (typically handled internally by game logic)
local track = Prefab("animal_track", fn, assets)()
track.Transform:SetPosition(x, y, z)
track.AnimState:PlayAnimation("idle")
-- The track automatically fades out via internal periodic task

Dependencies & tags

Components used: inspectable, transform, animstate, network Tags: Adds track

Properties

PropertyTypeDefault ValueDescription
scrapbook_specialinfostring"ANIMALTRACK"Marker for scrapbook integration
scrapbook_adddepstableList of animal prefabsDependencies listed for scrapbook entry generation
_fadetimenumber15Remaining fade-out time in seconds
_basealphanumber1Base opacity value used during fading
persistsbooleanfalseIndicates this entity is not saved to disk

Main functions

SetBaseAlpha(base)

  • Description: Updates the base alpha value used for fading and immediately re-applies the current opacity level.
  • Parameters: base (number) — new base alpha value between 0 and 1.
  • Returns: Nothing.
  • Error states: None.

Events & listeners

None identified.

Constants

ConstantValueDescription
FADE_DURATION15Total time (seconds) before the track fully fades and is removed
FADE_DTFRAMESTime step (in frames) used for periodic fade updates