function that you will create—a user-defined function. If you think that you’ll use a particular procedure over and over
and call it from different places or objects, it may be worth putting in its own function. An example might be a three-way
light switch. Three separate switches can toggle the light off and on, but only the light contains the code to handle the
functionality. Each of the switches would call the light’s on/off function. In the case of the IsTrigger toggle, you might
test it with a key press, but later you might have to press a button to toggle it or even let it be triggered by some other
event. You will name the function ToggleTrigger.