Definition: actuator(idx) / actuator(idx) = expr — Allowed: numeric expressions for idx/expr; Not allowed: string indices.
Reads an actuator channel exposed by the host (1-based index in scripts). Use assignment actuator(idx) = expr to drive it.
// Toggle actuator 1 when input 2 rises
if (p_edge(in(2))) {
actuator(1) = !actuator(1);
}