The Patrol Movement Style for Gamestar Mechanic Enemies

Part of Gamestar Mechanic For Dummies Cheat Sheet

In Gamestar Mechanic, an enemy using the Patrol movement style sticks to its territory. Rather than turn only when it collides, this enemy changes direction in order to stay inside a certain predefined area.

The Patrol Range setting appears whenever you select this movement style, allowing you to specify how far the enemy is willing to travel. If you set a patroller’s turn direction to Random, it acts as though it has the straight movement style. Like enemies using the straight movement style, patrol-style enemies function differently based on their turn direction, as described in this list:

  • Reverse: When this enemy travels as far as its patrol range allows, it reverses direction and returns to its original position, only to reverse again and continue moving. The enemy then paces back and forth over a set distance, making it useful in platformer games when you don’t want a non-pacer-style enemy to fall off a ledge.

  • Left or Right: Rather than patrol over a line, this enemy runs around in a square shape, with side length determined by its patrol range. For example, an upward-facing enemy with a patrol range of two moves two spaces up, two spaces to the side, two spaces down, and two spaces back to its starting position. These enemies make interesting revolving patterns that you can apply to make pinwheels or other rotating dangers for the avatar.

  • Random: This setting can lead to some weird behavior. Some sprites move randomly within a two-by-two space, others run in place, and still others abandon their patrol ranges completely. Applying patrollers with this setting can be difficult — you may want to use different settings instead.

Patrolling enemies have lots of applications, especially when you don’t want to use blocks to keep their movements in line. However, if a patroller falls or is pushed off its path, it may have trouble returning to its territory. This enemy is best left to its own devices, without the nuisance of dealing with elements such as gravity or motion blocks.