Hi,
On pg.7 of the Jungle Beginners tute it says:
[quote:ztt5h4bf]Now to flip the snail's direction on the edges:
Event: SnailEnemy -> On collision with another object -> EdgeMarker
Subevent: SnailEnemy -> Compare instance variable -> action equal to "right"
Action: SnailEnemy -> Set value -> action to "left"
Subevent: Else
Action: SnailEnemy -> Set value -> action to "right"
It's important to use Else here, because events are run from top-to-bottom. If instead of 'else' we said 'action equal to "left"', notice the previous event would have just set it to that. So it'd just set it right back again, having no overall effect. By using 'else', we prevent the second event running if the first was true.
If instead of 'else' we said 'action equal to "left"' wouldn't the snail still move left because it is no longer "on collision with EdgeMarker"? Or if it is, then shouldn't the snail keep turning left, then turning right indefinately? What actually happens is the snail continues as if the collision with EdgeMarker does not mean anything. Why is that?