Next: , Previous: , Up: AI   [Contents][Index]


2.4 Minion Module

Component: MinionModule

This component allows the player to select/deselect an AI and give it direct move orders with the mouse. To use it effectively, we recommend pairing it with a NavModule and attaching some sort of combat AI system to it such as a ’Hitscan Module’

Field of MinionModule: LayerMask clickMask

Layer mask indicating what we can click against

Command Settings

Required Field of MinionModule: string deselectionTag

When clicked, objects of this tag will cause deselection. Send the ’Select’ message to this object to select it

Required Field of MinionModule: string movableTag

When clicked with ’moveButton’, will cause a move order to be issued

Field of MinionModule: List<string> attackableTags

Tags of objects we like to hunt

Default value: new List<string>()

Field of MinionModule: int moveButton

Mouse button to use for movement, 0 = left, 1 = right, 2 = middle

Default value: 1

Field of MinionModule: int selectButton

Mouse button to use to select for direct-click selection

Default value: 0

Field of MinionModule: GameObject selectionIndicator

An object, parented to this one, which indicates selection when active (Like a health bar, or something glowy)

Field of MinionModule: float initialMoveDistance

How far we should move forward when spawned

Default value: 3.0f

Field of MinionModule: List<MonoBehaviour> disabledWhileSelected

List of objects to disable when we’re selected

Default value: new List<MonoBehaviour>()

Available Messages

Message on MinionModule: Select ()

Causes this Minion Module to become selected, ready to receive orders from mouse events.

Message on MinionModule: Deselect ()

Causes this Minion Module to become deselected, no longer able to receive orders from mouse events.

Field of MinionModule: LayerMask clickMask

Layer mask indicating what we can click against

Command Settings

Required Field of MinionModule: string deselectionTag

When clicked, objects of this tag will cause deselection. Send the ’Select’ message to this object to select it

Required Field of MinionModule: string movableTag

When clicked with ’moveButton’, will cause a move order to be issued

Field of MinionModule: List<string> attackableTags

Tags of objects we like to hunt

Default value: new List<string>()

Field of MinionModule: int moveButton

Mouse button to use for movement, 0 = left, 1 = right, 2 = middle

Default value: 1

Field of MinionModule: int selectButton

Mouse button to use to select for direct-click selection

Default value: 0

Field of MinionModule: GameObject selectionIndicator

An object, parented to this one, which indicates selection when active (Like a health bar, or something glowy)

Field of MinionModule: float initialMoveDistance

How far we should move forward when spawned

Default value: 3.0f

Field of MinionModule: List<MonoBehaviour> disabledWhileSelected

List of objects to disable when we’re selected

Default value: new List<MonoBehaviour>()

Available Messages

Message on MinionModule: Select ()

Causes this Minion Module to become selected, ready to receive orders from mouse events.

Message on MinionModule: Deselect ()

Causes this Minion Module to become deselected, no longer able to receive orders from mouse events.


Next: , Previous: , Up: AI   [Contents][Index]