Step 5

Description of the patrolling enemy script

Here's how your script should work:

When created: set velocity y to 100, set immovable true, add tag killer on myself, set scale x of myself to -1. Constantly: if y position of myself is smaller than 0, set velocity y to 100. If y position of myself is larger than 500, set velocity y to -100. When touched, get toucher: if instance "toucher" has tag player, destroy myself. If you get really stuck, go to the next step to see how it should look.

results matching ""

    No results matching ""