Use the toggle switch to make a lamp turn on and off DEF LightSwitch TouchSensor { } DEF LampLight SpotLight { . . . } DEF Toggle Script { . . . } ROUTE LightSwitch.isActive TO Toggle.set_active ROUTE Toggle.on_changed TO LampLight.set_on
DEF LightSwitch TouchSensor { } DEF LampLight SpotLight { . . . } DEF Toggle Script { . . . } ROUTE LightSwitch.isActive TO Toggle.set_active ROUTE Toggle.on_changed TO LampLight.set_on