
|
With regard to unit clarification, 1 JKU is the equivalent of 1 meter, a time value of 3000.0 msec is the equivalent of 3 seconds and boolean values within are assigned by either a 0 (false) or 1 (true) value. Interestingly, both integer and floating-point numbers seem to be legal values for boolean arguments (but must be of the form 0.0 or 1.0).
Each instinct has a set number of arguments which must be set, in order for the AI character to use that instinct. The following details show examples, as well as listing each argument effect and type.
RandomTurn 1000.0, 0.5
Argument 1: Time interval to wait before checking for a new turn (msec)
Argument 2: Minimum distance to see for valid turns (JKUs)
This instinct forces the AI character to make random turns. Argument 1 provides a time-based unit (msec) as an interval before the character checks for a turn, whilst argument 2 specifies the minimum distance required to see for valid turns. The vast majority of LEC's AI files have 0.5 as argument 2's value.
This section details how the instinct is initiated. In some cases, a charactor's AI are dependent upon certain actions/events occurring before the instinct is triggered.
LookForTarget seems to initialise this instinct but not actually "move" the AI character. While the player is not within the AI's FOV (as set by the "fov" attribute value in the AI Setup line, the AI character will continue to randomly turn (on the spot seems to be the default action for this instinct). The moment that the player is spotted, it will face the player's position. If the player moves, the AI character will not turn to face the new direction. The inital direction is not refreshed until the player leaves the AI's FOV value; upon which, the AI will pause for argument 0's value before re-starting this instinct.