Rose Petals Fx
Based on game build 714014 | Last updated: 2026-03-07
Overview
rose_petals_fx is a simple entity prefab that renders a one-time falling rose petal animation. It is designed to be spawned for transient visual effects — for example, during atmospheric or narrative moments — and is automatically removed after its animation completes. It has no persistent logic on the server and is not replicated beyond its initial spawn and animation playback.
Usage example
-- Spawn the rose petals effect at a specific world position
local inst = Prefab("rose_petals_fx")
inst.Transform:SetPosition(x, y, z)
inst.AnimState:PlayAnimation("fall")
Dependencies & tags
Components used: None identified.
Tags: Adds FX tag.
Properties
No public properties.
Main functions
fn()
- Description: The prefab constructor function. Initializes the entity with required components (
Transform,AnimState,SoundEmitter,Network), sets up animation playback for the falling petal effect, and registers cleanup behavior if running on the master simulation. - Parameters: None.
- Returns:
inst(TheEntity) — the constructed entity instance. - Error states: Returns early on non-master clients without further setup.
ErodeAway(event)
- Description: Cleanup function called automatically when the animation completes (via the
animoverevent). Removes the entity from the world. - Parameters:
event(string) — the event name ("animover"). - Returns: Nothing.
- Error states: Not applicable.
Events & listeners
- Listens to:
animover— triggersErodeAwayto remove the entity after animation finishes. - Pushes: None.