Hey guys, I'm currently in the process of learning Vizzy and ran into an issue. I don't want want a certain string to run past 15km, so I tried using "If [Alt ASL < 15000] then" but the string still runs past 15000. I also tried "While [Alt ASL < 15000]" but that didn't work either. Does anyone have any ideas to keep the string limited to below 15km?
Tags
Question5 Comments
- Log in to leave a comment
-
-
9,400 RudimentaryCheezit
but with vizzy there is never an exact number, it is almost always a minuscule fraction. unless you use the “round” operator, it will round the fraction to the nearest whole number
-
9,400 RudimentaryCheezit
instead of using the less than (<) symbol, use the greater than symbol (>)
-
1,176 YaMomzBox420
Try the [While()] block without anything in the empty bubble and use [If(AGL>{whatever AGL the craft is at while grounded}) Then] followed by an [else if(AGL>15000) then] [Break]. The while loop will continue to run indefinitely once it's started, even with the (bubble) empty, but will only start during the specified conditions. The [if()then] block is the start of whatever process you want to do, everything after that is up to you. The [else if()then] is how you set where(or when) you want the code to stop repeating itself, and the [Break] block ends any any ongoing while loops(only if it's nested in that particular loop). Basically you want the while loop to break at a certain AGL, so just use [else if()then] with a [break], and any parts of code after that will also work just fine without weird interference
You can also just use the wait untill block, so
wait untill: Alt AGL > 15000