S2ENGINE HD  1.4.6
Official manual about S2Engine HD editor and programming
Coverpoint

Base Class: AIPoint

Coverpoint.jpg

Overview

CoverPoint is a special kind of AIPoint that is used by AIGetNearestTacticalCoverPoint,AIGetNearestCoverPoint and AIGetFurthestTacticalCoverPoint,AIGetFurthestCoverPoint functions to respectively choose the Nearest or Furthest point an AI agent can reach from a given position (usually its position) to cover itself from a given opponent (usually the player character). CoverPoints also have a visibility cone with 45 degrees FOV. This cone is used during the choice of the best coverpoint because it represents the cone in which AI agent is sure He is not viewed: of course it's an important task of level designer to choose the right orientation of the coverpoint to best place the visibility cone. An ID is also associated to a CoverPoint to let AIGetNearestTacticalCoverPoint and AIGetFurthestTacticalCoverPoint to choose only points with a given ID. An important difference between coverpoints and other tactical points (see PatrolPoint) is that they can be scripted. When needed (for example a coverpoint is reached) AI agent can send a message, specifing a range of influence, to the AI system (using SendMessageAI) which, basing on the range, chooses coverpoints and sends them the received message. Using coverpoint script you can process this message.

See also
Editing Points to know how to create and edit AI Points. For more informations about using AI objects see AI.
Parameters
radiusradius of the coverpoint, used by AIGetFurthestTacticalCoverPoint and AIGetNearestTacticalCoverPoint to avoid coverpoint is choosen too close to the opponent. If the distance from the opponent is smaller that coverpoint radius the coverpoint is discarded.
ID(int) ID of the patrol point, it is used as filter into AIGetNearestTacticalCoverPoint function.

Receiving Messages

none

Sending Messages

none

See also
Messages