More than one question

Try itMaking choices

Two paths are not always enough. This slime has three.

if
else if
else
end

How to read it

The slime asks its questions from the top down. It stops at the first yes.

LineIt means
if my health is 100First question. Yes? Chase.
else if my health is under 50Asked only when the first answer was no. Yes? Run away.
elseBoth answers were no. Stand still.

Three hits, three moods

AfterIts healthWhat the slime does
No hits100Chases the hero.
1 hit67Stands still. It is thinking again.
2 hits33Runs away.

Try it

  1. Press Play Play this script and click the little game.
  2. Wait for the slime, and hit it once with X. It stops.
  3. Walk up to it and hit it again. It runs.

This section ticks itself when you press Play.

Press Play in the code box to finish this section.