🔵Soldier

NPC that attacks Hostiles who also defends itself when attacked.

COPY/PASTE PARAMETERS

New in GM 0.11! Right click on a behaviour or component to copy. Then open an object, add the same behaviour or component, and right click it to paste identical parameter settings.

This behaviour has not yet been migrated for use in multiplayer Experiences.

  • When applied to an Asset it will defend the area for hostiles and attack them on sight. Soldier won't attack you unless you attack them first.

Common Uses

  • Patrolling NPC, or non-player character, that confronts hostiles as a line of defense

Communications

Inputs:

Detects specified Tags (default Tag is Hostile, which is added to any object or Avatar that attacks Citizens or Soldiers)

Outputs:

If any of its Tags to Attack are detected, moves toward and attacks the Avatar or Objects with its target Tags, otherwise peaceful

Parameters

OptionsDetails

Patrol Zone - define the space where the Object will walk around. It may step up or down one block at a time. This parameter is visualised with a blue cube Gizmo that adjusts as you enter new X, Y, and Z values.

Tags to Attack - Defines which tags the Object will chase and attack if within its range.

Auto Defense - If set to True, the Object will fight back if it is attacked.

Random Walk Frequency - Determines how often, in seconds, the Object will change direction when patrolling.

Last updated

Logo

Copyright © 2012- 2023 The Sandbox. All Rights Reserved.

#123: GM 0.11 update - do not publish until public release

Change request updated