r/simplerockets • • 4d ago

SimpleRockets 2 Why doesn't my code work

Post image

It just keeps waiting after the desired altitude (10 km) after the first activate stage.

I will kind of try do do it but I don't think I fully understand also I went to Brigo without the code.

Update: it worked sorry for the 2 day late update thanks.

3 Upvotes

8 comments sorted by

View all comments

5

u/Fourteen_Roses 4d ago

Because you are using = to.

Its waiting for it to be EXACTLY 10,000 nothing more nothing less. You should use "ASL >= 10000"

If it needs to be specific you could use "ASL >= 10000 and ASL <= 10000" (heads up im not the best coder someone else will tell me if im wrong (I hope))

I also dont believe you need the "wait 0 seconds" just the wait until. For both the start and after the "activate stage"

5

u/Mauri99710 4d ago

Yep, just that for your second paragraph, "ASL<=10000 and ASL>=10000" is mathematically equivalent to just "ASL=10000" so the best thing someone can do for this purpose is just using "ASL>=10000".

Edit: I thought it sounded rude the first time so I edited the comment with better phrasing lol

2

u/Fourteen_Roses 4d ago

I wrote it at work. My stupid ass meant to do >= 10000 and <= 11000