In the last section we had a situation where the Angel only responded if he was close enough to the Egyptian. In the case he WASN'T close enough, we did nothing (there was no statement under the Else part of the if/else statement). So, in some cases (based on the state of the world) we would do something and sometimes we wouldn't do anything. (Though we always did the statement AFTER the if/else statement/tile -- the 3D Text appears no matter what the state of the world is because it is after and not on the green if/else tile).
But what if we want something to happen in the case where the Egyptian is not close enough? It's kind of rude for the Angel just not to respond. In the case the Egyptian is "too far away" let's have the Angel say, "Sorry dude, I'm out of range."
Drag the say method from the Angel over top the words Do Nothing under the Else and then type in what he should say.
Hit Play to see what happens (based on last section, your Egyptian should start out placed "far away" from the Angel -- that is outside the blue circle which indicates the area within 5 meters of the Angel).
Your Angel should have apologized for being out of range.
[Q8.3.1]: Where would you need to move the Egyptian in the world so that the Angel would move to the Egyptian?
Play around with the starting location of your Egyptian to make it so that each path of execution of the if statement occurs. See if you can find the exact location where the Boolean expression switches from evaluating to false to evaluating to true.
[Q8.3.2]: Draw the path of execution by putting a box around each instruction executed in the code below where the Egyptian is 8 meters away from the Angel. Indicate the order in which instructions are executed with a number next to each box and by drawing arrows from one box to the next (make sure your code matches the code below).
Code for [Q 8.3.2]