So far we have controlled how our world should execute by checking whether the distance between two objects is greater than a certain amount -- or not. Now we'd like to play around with other ways we can control conditional execution -- other forms of Boolean expressions that evaluate to either true or false. For the sake of efficiency, we may not do things that necessarily make much sense in our particular world... but we can still get an idea of what our options are.
There are a lot of functions that return Boolean values (true or false) under the World object, functions. Scroll down to the second section called "math".
Practice Activities:
Changing Distance:
Checking for an exact Distance:
[Q8.4.1]: What if we wanted to have the Angel approach the Egyptian only in the situation where the Egyptian is less than 2 meters tall, and otherwise have the Angel say "Sorry, try again". Suppose you have the code from the last example. What would you change the Boolean expression to be?