Page MenuHomeFeedback Tracker

Implement AI related eventHandlers
New, NormalPublic


Giving us some AI eventhandlers would greatly help the community to influence the AI behaviour more effectively.
A few simple eventhandlers would open a massive amount of possibilities.

Here is a list of what I would deem useful:

  1. HandleKnowsAbout (Triggers when the knowledge of a unit is about to change)
    • unit: Object
    • target: Object
    • knowledge: Number
    • cause: String - reason for the change of knowledge, could be something like "heard", "seen", "group", "shotby" or whatever the engine offers...
  2. HandlePathing (triggers when unit tries to move somewhere. Return array of points to define a custom path, empty Array to cancel(fail) the movement or false keep engine behaviour)
    • unit: Object
    • points: Array
    • issuedBy: - what caused the move? (unit, waypoint, script, combatrelated)
  3. DetectedMine
    • unit: Object
    • mine: Object
  4. HandleSuppression (return new suppression value or false for default)
    • unit: Object
    • suppression: Number
    • source: Object - Unit that caused the suppression
    • instigator: Object - Person who pulled the trigger
  5. TargetChanged (triggers when a new target is assigned to the unit)
    • unit: Object
    • target: Object
  6. CombatModeChanged
    • unit: Object
    • combatMode: String
  7. HandleReload (return magazine name or false)
    • unit: Object
    • weapon: String
    • magazine: String - magazine name it tries to reload or "" if none is found
  8. HitNear (FiredNear uses the position of the shooter, this uses the position of the impact and parameters similar to HitPart)
    • unit: Object
    • shooter: Object
    • bullet: Object
    • position: Position3D
    • velocity: Vector3D
    • ammo: Array


Operating System
Windows 10 x64

Event Timeline

Tajin created this task.Oct 11 2017, 10:40 AM
Tajin updated the task description. (Show Details)Oct 11 2017, 10:57 AM