On this page
output.set_button
Overrides one button for the current on_input packet; down defaults to true when omitted.
Syntax
Atlas Script
output.set_button(button, down?)Parameters
button- Controller button name or platform constant to read or change.
downOptional- Boolean button state: true presses the selected button and false releases it.
Return value
See the remarks for the returned value and runtime behavior.
Remarks
Overrides one button for the current on_input packet; down defaults to true when omitted. L2/R2 names set that trigger fully on or off. The patch flushes when on_input returns.
Examples
Pressed, held, and released.atlas
event on_input() {
if (input.pressed("L1")) {
system.log("L1 pressed");
}
if (input.held("L1")) {
output.set_button("cross", true);
}
if (input.released("L1")) {
system.log("L1 released");
}
}