can anyone tell me how i would convert this in to a function so I can set varibles for the tigger times and delays etc?
[{"id":"3640f1c3.dbf8de","type":"trigger","z":"ff81c2c4.ef9ce8","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"10","extend":true,"units":"s","reset":"false","bytopic":"all","name":"","x":310,"y":1340,"wires":[["9304594e.7dab1"]]},{"id":"c45583c1.0452","type":"rpi-gpio out","z":"ff81c2c4.ef9ce8","name":"","pin":"11","set":true,"level":"0","freq":"","out":"out","x":860,"y":1240,"wires":},{"id":"d37c989.ee56068","type":"ui_text","z":"ff81c2c4.ef9ce8","group":"2f45f695.6435ba","order":4,"width":"1","height":"1","name":"","label":"","format":"{{msg.payload}}","layout":"row-spread","x":850,"y":1320,"wires":},{"id":"aca68c3b.4c646","type":"trigger","z":"ff81c2c4.ef9ce8","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"-200","extend":false,"units":"ms","reset":"false","bytopic":"all","name":"","x":520,"y":1240,"wires":[["a2323876.991ec8","d37c989.ee56068","c45583c1.0452"]]},{"id":"9304594e.7dab1","type":"ui_switch","z":"ff81c2c4.ef9ce8","name":"cam flash","label":"flash","group":"2f45f695.6435ba","order":5,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":310,"y":1240,"wires":[["aca68c3b.4c646","3640f1c3.dbf8de"]]},{"id":"152a5f4b.d77c11","type":"inject","z":"ff81c2c4.ef9ce8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":1240,"wires":[["9304594e.7dab1"]]},{"id":"a4564367.fba","type":"inject","z":"ff81c2c4.ef9ce8","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":100,"y":1280,"wires":[["9304594e.7dab1"]]},{"id":"a2323876.991ec8","type":"delay","z":"ff81c2c4.ef9ce8","name":"","pauseType":"delay","timeout":"100","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":550,"y":1280,"wires":[["67a10a3d.fd0094"]]},{"id":"67a10a3d.fd0094","type":"change","z":"ff81c2c4.ef9ce8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":1320,"wires":[["d37c989.ee56068","c45583c1.0452"]]},{"id":"ed3d4738.2751e","type":"comment","z":"ff81c2c4.ef9ce8","name":"flash camera light for a set time","info":"","x":150,"y":1200,"wires":},{"id":"2f45f695.6435ba","type":"ui_group","z":"","name":"Train Controls","tab":"22e251db.19b2fa","order":3,"disp":true,"width":"7","collapse":false},{"id":"22e251db.19b2fa","type":"ui_tab","z":"","name":"Roller Coaster","icon":"dashboard","order":1}]