set mood to 5give mood a starting value
Lesson / Scratch & Game Design
The space pet insists it was fed, but the program has forgotten. Give its needs names, decide what changes them, and make every new game start with a clean memory.
Choose two changing needs and give each one a useful name.
Set a value, update it from an event, and use it in a condition.
Add care actions, time-based change, and a visible state.
Create a stale value deliberately, then repair the initialization.
Show where a variable starts, what changes it, and which rule reads it.
set mood to 5give mood a starting value
change mood by -1update mood over time
if mood < 2make a decision from the stored value
set game_state to PLAYINGrecord the current mode
Guided project
Keep an alien pet fed, rested, and reasonably trusting. It remains suspicious of the snack button.
At least two changing needs, Actions that affect those needs, Visible mood or state, Time-based change.
Variables, State, Events, Conditions, Timers.
A working version with a tested change, one repaired problem, and a clear explanation.