{ "start": { "state": "Idle" }, "states": { "Idle": { "transitions": [ { "target": "PickupTrash", "signal": "waste_detected", "conditions": [ { "type": ">=", "left": { "value": 400 }, "right": { "function": "distance", "args": [ { "accessor": [ "character", "position" ] }, { "accessor": [ "signals", "waste_detected", "args", "waste", "position" ] } ] } } ], "transfer": { "waste": { "accessor": [ "signals", "waste_detected", "args", "waste" ] } } } ] }, "PickupTrash": { "transitions": [ { "target": "ThrowTrashAway", "signal": "waste_detected", "conditions": [ { "type": ">=", "left": { "value": 75 }, "right": { "function": "distance", "args": [ { "accessor": [ "character", "position" ] }, { "accessor": [ "signals", "waste_detected", "args", "waste", "position" ] } ] } } ], "transfer": { "waste": { "accessor": [ "signals", "waste_detected", "args", "waste" ] } } } ] }, "ThrowTrashAway": { "transitions": [ { "target": "Idle", "conditions": [ { "type": ">=", "left": { "value": 90 }, "right": { "function": "distance", "args": [ { "accessor": [ "character", "position" ] }, { "accessor": [ "root_nodes", "StateMachineWorld", "child_nodes", "TrashBin", "position" ] } ] } } ] } ] } } }