(2 min.)
Log In!

Students Logged In




"Crash Landing!"
Episode 2 ・ Fruit Galaxy

Get Ready!
Part 1


Last time on
Star Stuff!



I was just an average star-maker, stationed at Rainbow Galaxy.
I watched bots make stars every day...
LUZ
Until everything got turned upside down by Wolf,
the founder of Unibots.

LUZ




He "updated" all the bots to only make one kind of star —
a star shaped like his face!

LUZ










That's where I come in. I convinced Luz to help me
reset the bots completely, and code them from scratch.

VALERIA

Somehow, it worked — we restored our station's colorful stars. Though we had to help out the bots ourselves, too.

LUZ


After teaching our methods to the rest of our station, we set off on an adventure to restore stations in other galaxies.

VALERIA



But will that adventure be cut short thanks to someone's careless spaceship driving? Let's find out...

LUZ



Our story continues...

The station's up ahead! Now to stick the landing!

VALERIA






C
R
A
S
H
!
!
!

Huff...hah...we made it, barely. But our ship is wrecked!
LUZ








It's fine, it's fine. Every station has a spaceship repair system,
so we can just use that later.
VALERIA





Urk...if they even let us use it. By the way, where are we??
LUZ







You're at the Fruit Galaxy station! Welcome, welcome!
???






Woah, hey there! I'm Valeria, this is Luz. And you are...?
VALERIA





ED
Oh, right! My name's Ed-





BOTS
Bzzt! Bang! Zoom!









Eeek, that bot almost hit you! Are you okay...Ed, right?
LUZ








ED
...Yeah. Yeah! No problem. Sorry, things are a little out of control right now.







ED
See, our station was already low on stardust,
and Wolf's big evil plan has nearly wiped it out.






ED
Without stardust, we can't fuel anything in the station —
we won't even be able to make stars at all!






VALERIA
That's definitely a problem. Well, Luz and I can help you. We restored
our own station by using the old star-making technology.






ED
...Really? That's amazing, we'd love your help!
In that case, I can show you around.






VALERIA
Cool, thanks. By the way, do you think we
could use your spaceship repair later?






ED
Ah, I noticed your...explosive landing! Sadly, the repair's
not working right now because of our low stardust.






ED
But if you can somehow restore our stardust,
you can use it all you want!






LUZ
We should start on fixing things up soon, then.
We might get stranded here otherwise.





ED
Yes yes, let's head over to the old star-making systems.
Do you two have your star forms ready?






VALERIA
Sure do. Star Transformer, make me a star!





































































Ooh, it's my first time actually in here!
What are all these things?

ED


That big yellow button is the Starpad — it gathers up stardust, so pressing that is our main goal.

LUZ


There's also two cubes near us,
and two cube trays on the other side.

VALERIA


I also see a single switch in the middle...
not sure what that's for.

LUZ


Below that, there's two buttons and a Walker bot.

LUZ



Since we can't get very far right now, we probably need to code that bot using the terminal here.

VALERIA



Yeah. Let's look at it.

LUZ



Huh? There's a command here I don't recognize.
It says wait for .

LUZ


wait for



Hm...what do you think telling a bot "wait for" means?
wait for

VALERIA





It sounds familiar...maybe it means
to wait for some kind of signal?

ED




...Maybe the bot will just wait forever?

LUZ




Or maybe the bot waits for a specific amount of time?

VALERIA




Now I'm curious! Let's try and see if we can figure it out!

ED




Explore!
Part 2


Think about
this question while you play...
What does telling a bot
wait for mean?
- Wait for a specific signal
- Wait forever
- Wait for a specific amount of time
Be ready to vote then discuss
how you know after time is up!

wait for

Vote before Discussing
Polling...
Responses



What does telling a bot mean?
wait for
Wait for a specific signal
Wait forever
Wait for a specific amount of time
2
3
1
What does telling a bot mean?
How do you know?
Let's Pair Share!



wait for
Wait for a specific signal
Wait forever
Wait for a specific amount of time
2
3
1
Let's Pair Share!



What does telling a bot mean?
How do you know?
wait for
Wait for a specific signal
Wait forever
Wait for a specific amount of time
2
3
1
Learn!
Part 3


If I add "wait for" to my code, I have to choose one of the objects to wait for...but what does that mean?

LUZ


wait for



...Ah! I remember how "wait for" works now! It tells the bot to wait for a specific signal before doing the next line of code.

ED

wait for



A signal? How can we send a signal to a bot?

LUZ





By interacting with puzzle objects. For example, pressing
a button or flipping a switch will send a signal.

ED



These signals are also called events. And "wait for" is a type of event listener — it tells bots to listen for specific events.

ED

wait for


...Did you know that this whole time?
Either way, thanks for telling us.

VALERIA





We already looked at the different puzzle pieces here,
but let's make sure we understand how they connect.

VALERIA



First, the bridge to the goal. Looks like it'll turn
on if we put cubes in those two cube trays.

VALERIA



To get these cubes over there, we'll have
to cross the two bridges in the middle...

LUZ



...And both bridges have a button they're connected to!
That must be the way to turn them on.

ED



We can't reach those buttons, but the Walker bot can.
Let's try writing some code for it.

VALERIA



Button A turns on the bridge closest to us, right?
So first let's try adding go to [ A

LUZ

go to




A


A

There we go. Next...

LUZ






I'm not sure. Button B turns on the next bridge we
need to cross, so maybe the bot should go there?

LUZ



B
Makes sense. And we can carry the cubes
with us as we cross the two bridges.

VALERIA



B
Yeah. So I'll add "go to B" next, then click Run.

LUZ




go to




B




B









...H-hey, wait!

LUZ





Hmm. I don't think we can move fast enough to cross the bridge. The bot's only on the button for a split second.

VALERIA




If only the bot would wait for us to finish crossing
before going to the next button!

ED



Wait for us...? Oh! Should we try using
the "wait for" command?

LUZ


wait for



Good idea. Let's reset and try it.

VALERIA





Hmm...if I click wait for it gets added to the end of my code. Is that where it should go?

LUZ


wait for


VALERIA



Bots run code in order from top to bottom, so it would be waiting for us at the end. That doesn't seem right.

ED



I have a tip! To help figure out where to put "wait for", ask yourself: which line of code did the bot do too quickly?

ED



Whatever the answer is, add the "wait for" before that line to give yourself more time!

LUZ



Hmm...when we ran the code, the bot went to button B too quickly.

LUZ



So we should add "wait for" before "go to B"?

VALERIA



That makes sense. If the bot waits for us while it's still on button A, we can take our sweet time to cross the bridge.
Got it. Now the question is...which event should the bot wait for? There's a lot of options.

LUZ




Which event should the bot wait for?
Think independently before starting poll
Poll Preview




Vote!
Which event should the bot wait for?
Polling...
Responses





Button A
1
2
3
4
Button B
Cube Tray D
Switch E
Vote!
Polling...
Responses


Which event should the bot wait for?


Button A
1
2
3
4
Button B
Cube Tray D
Switch E

If you're not sure what to wait for, try process of elimination!

ED




In other words, try ruling out all the
incorrect options first to find the correct one!

ED



Hm...well, I think we can rule out buttons A and B.

LUZ




Since we can't reach either button, there's no way to press them and let the bot know it can keep going.

LUZ



We can rule out cube trays C and D for the same reason then. We can't reach either of them with only the first bridge on.

VALERIA



So only switch E is left. That could work...we'll be
able to reach the switch once the bot is on button A.

LUZ



Yeah. Maybe that's why the switch isn't wired to anything...it's just meant to be used as an event that the bot can listen for.

VALERIA



Alright. I'll tell the bot to wait for switch E.

LUZ


E

Now let's run this code and try it again...

LUZ












Check it out, the bot's waiting on button A!
Now we can take all the time we need!

ED





Sweet. Let's carry the cubes over first, then flip switch E. That should tell the bot it can move on to the next line.

VALERIA



Right. First bring the cubes...

LUZ










...Then flip the switch.

LUZ








See that? The bot moved to button B
as soon as you hit the switch!

ED






Cool, it really listened! Now we can cross the bridge, and put the cubes in their cube trays.

VALERIA




















That turns on the bridge to the Starpad...

LUZ


And now the Starpad will gather up stardust!
Great problem-solving, you two!

ED








You helped us out, Ed. Now that we know how to use
wait for," we'll have a lot more control over the bots' timing.






VALERIA


wait for

Yeah. We don't have to worry as much
about doing things fast enough.

LUZ







Happy to help! Should we move on to the next puzzle?

ED








Yeah, let's go.

LUZ







...Huh? I can't reset this bot like all the others...
I can't even change the code.

VALERIA





That purple bot over there? Let me take a look at it.

ED




...I knew it. This is one of Wolf's rogue bots.

ED



What does that mean?

LUZ





Like Valeria said, you can't delete or change their code. Wolf must have added these to try and slow you down.

ED



...Ugh. Well unlucky for him, we won't give up that easily. How can we work around it?

VALERIA





Hmm...if we read the code carefully, we might find a way to use these rogue bots to our advantage.

ED



Right...we can still run the code, so we can plan our actions around what the bot does.

VALERIA




How can you be so sure we'll find a way...?

LUZ







We have to — otherwise, this station runs out of stardust and we're stuck here.

VALERIA






Plus, I'm confident in us. You should be too, Luz. I know we can get past whatever Wolf throws at us.

VALERIA




Keep Going!
Part 4


Keep this in mind as you play...



Watch out for rogue bots!
You can't change their code. Read and run the code to figure out what to do.
If you get stuck, you can
rewind with Z and reset with R.

Use wait for to make a bot wait
for a specific event, like pressing a button or flipping a switch.
wait for


Check In!
Part 5



Phew...we managed to outsmart all the rogue bots.
LUZ






Told you we could do it.
VALERIA





Yeah yeah, you were right, Valeria. Like always.
LUZ







ED
Hey hey, you two fixed things just in time!
Our stardust levels are growing again!






ED
You made our fruit stars shine again, and you even
made a new star! We can't thank you enough, really!






Our candied fruit star does look delicious. Doesn't it, Luz?
VALERIA






It was fun to make. But I'm really craving something something sweet now!
LUZ





ED
By the way, we can bring your spaceship
to the repair now — we have enough stardust to fuel it!






Cool, thanks! While we wait for the repair to finish,
why don't we teach the other star-makers how to code the bots?
VALERIA





ED
Great idea! I'll go get everyone! See you real soon!





A while later...


Woah, our ship looks good as new! Thanks Ed, you helped us out a lot here.
VALERIA






Actually...Ed, do you want to join us? We could use
your skills, even if you won't tell us how you got them.
VALERIA






ED
Haha! Well, I'm honored by your offer. Honestly!






ED
But, I have something really important to do here.
So I can't join you right now.





ED
That being said...I have a feeling I'll see you again soon.
If you'd like, we can keep in touch, too!





Okay, no problem. Let's add each other on our Rocket-Talk-Its.
VALERIA








Alright then...it's time we head off to the next galaxy. Ready, Luz?
VALERIA






Yeah. Thanks again, Ed. Hope we see you soon.
LUZ






...Luz, you're being quiet. What's wrong?
VALERIA


It's nothing...it's just. Would you rather do this with someone like Ed?
LUZ



What? I asked you, didn't I? Is this because I asked Ed to join us?
VALERIA



No...well, maybe. Sorry, just forget I said that.
LUZ



I want you to be honest with me, Luz.
We used to be best friends...but I know we kinda stopped talking.
VALERIA

I didn't mean for that to happen, though...
LUZ



I made things awkward...is it really gonna be okay with just the two of us?
LUZ (THINKING)



Anyways...we'll be at the next station soon.
VALERIA

Already? Well, at least your driving got better...
LUZ

Ha. Can't argue with you there.
VALERIA

Alright, we're landing.
VALERIA

...Huh? We just got here, but I have a weird feeling...
LUZ (THINKING)




Is someone watching us?
LUZ
Until

next
time...
Star Stuff LCR: Lesson 2
By sophiekansmith
Star Stuff LCR: Lesson 2
Template Deck
- 52