System Variables โ
System variables are values the scripts know at any moment. You cannot change them; you read them in conditions. They always start with !.
| Variable | Type | Value |
|---|---|---|
!owner_key | key | UUID of the object's owner. |
!touched_key | key | UUID of the avatar who clicked the button. |
!touched_face | integer | Number of the face that was clicked (0โ7). |
!av_status | string | What the owner's avatar is doing right now (see the list below). |
!pos | vector | The owner's avatar position in the region. |
Open the Object Variables panel (tools button โ { } โ System tab) to see this list inside the panel.
!av_status values โ
| Value | Meaning |
|---|---|
Standing | Standing still |
Walking | Walking |
Running | Running |
Jumping | In the air during a jump |
PreJumping | Start of a jump |
Landing | Landing after a jump |
Soft Landing | A light landing |
Crouching | Crouched |
CrouchWalking | Walking while crouched |
Turning Left / Turning Right | Turning in place |
Sitting | Sitting on an object |
Sitting on Ground | Sitting on the ground |
Standing Up | Getting up |
Flying | Flying |
FlyingSlow | Between hovering and flying |
Hovering | Floating in place |
Hovering Up / Hovering Down | Ascending / descending |
Taking Off | Starting to fly |
Falling Down | Falling |
Striding | Stuck on an edge |
Examples โ
Owner-only button. Condition !touched_key == !owner_key: success runs the real function, failure sends a Message "Owner only".
One prim, many buttons. Condition !touched_face == 2 โ helper face_2; nest another condition in the failure path for face 3, and so on.
Only while flying. Condition !av_status == Flying โ success plays the wings animation.
Notes โ
- Comparing a key with a key or with a string is allowed; comparing it with a number is not.
!av_statusreflects the owner, not whoever clicked.- More system variables will be added over time; the panel's System tab is always the current list.