Last active
August 26, 2022 15:21
-
-
Save calebcauthon/39fef771dde7bf294ea56074216d6167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"eventId": "1", | |
"status": "Ended", | |
"data": { | |
"EventType": "ValueChange", | |
"Value": "730" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
events = {} | |
scene = basics.build_empty_scene_object() | |
scene.on("bootup").showtext("lets get started. set engine to idle ") | |
scene.on("valuechange", basics.build_equals_condition("identification", "knob")).saveas("knobvalue") | |
scene.on("valuechange", basics.build_simple_condition( | |
"__knobvalue__", knobmap["engine"]["from"], basics.less_than | |
)).showtext(f"too small! engine is only __knobvalue__rpm. needs to get up to {knobmap['engine']['from']}rpm") | |
scene.on("valuechange", basics.build_simple_condition( | |
"knobvalue", knobmap["engine"]["to"], basics.greater_than | |
)).showtext(f"too big! engine is only __knobvalue__rpm. needs to get down to {knobmap['engine']['to']}rpm") | |
scene.on("valuechange", basics.build_multiple_condition([ | |
["knobvalue", knobmap["engine"]["from"], basics.greater_than], | |
["knobvalue", knobmap["engine"]["to"], basics.less_than] | |
])).showText("Good job!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment