// ChaosSystem.verse
// This script listens for a Rocket Boost pickup and triggers a chaos alarm.
// 1. Define the Script Structure
// Think of this as the "Brain" of your island. It holds all the logic.
ChaosSystem := script() {
// 2. Declare the Devices (The "Nodes" in our Scene Graph)
// We tell Verse to find these specific devices by name.
// If the name in Verse doesn't match the editor, it won't work!
ChaosBoost := object:RocketBoostPowerUpDevice
ChaosLights := object:PropMoverDevice
AlarmLights := object:PropMoverDevice
// 3. Define the "On Start" Function
// This runs once when the island starts.
On Start () -> void {
// We don't need to do much here, but we could set initial states.
// For now, let's just log that we're alive.
Print ("Chaos System Activated. Watch out!")
}
// 4. The Event Listener: "On Boost Picked Up"
// This is the core magic. We subscribe to the Boost's event.
// When the player picks up the boost, this function runs.
On RocketBoostPickedUp () -> void {
// A. Trigger the Alarm Lights immediately
// We use the PropMover's "Set Color" function.
// Imagine this as flipping a switch to turn the lights red.
AlarmLights.Set Color (Color { R: 1.0, G: 0.0, B: 0.0 }) // Red!
Verse Library
verse
01 Fragment
Listens for power-up pickups to trigger timed visual alarm effects on connected scene devices.
verse-library/transmitters/01-fragment.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.