ph_button
ph_button plays a button animation and switches sections when the object is used. Use it for physical buttons, levers,
and scripted controls.
The scheme is for physical objects. On activation it sets the object tooltip, subscribes PhysicalButtonManager, and
plays the configured animation cycle.
Parameters
anim
Type: string. Required. Default: none.
Animation cycle played on activation.
anim_blend
Type: boolean. Optional. Default: true.
Passed as the blending flag to object.play_cycle.
on_press
Type: condlist. Optional. Default: null.
Switch condlist evaluated when the active button is used.
tooltip
Type: string. Optional. Default: null.
Tip text shown on the object. Empty text is used when absent.
The section also supports common switch fields such as on_info and on_timer.
Example
[logic]
active = ph_button@off
[ph_button@off]
anim = idle_off
tooltip = st_press_button
on_press = ph_button@on %+button_pressed%
[ph_button@on]
anim = idle_on
anim_blend = false
Runtime sequence
SchemePhysicalButton.activatereads common switch conditions and button fields.- The object tooltip is set to
tooltipor to an empty string whentooltipis absent. PhysicalButtonManager.activatecallsobject.play_cycle(anim, anim_blend).- Manager updates evaluate common section switching such as
on_infoandon_timer. onUseevaluateson_pressonly while the object is still in the activeph_buttonsection.
Notes
animis required.anim_blenddefaults totrue.on_pressonly runs when the object is still in the active button section.- Common switch conditions are checked during update.
- Use
on_pressfor use-triggered transitions and common switch fields for background transitions.