Project

General

Profile

Agent (Top-Level Object)

Description

Retrieves information about agents

Forms

  • int Agent
    • returns the number of agents, total, in the game
  • agent Agent<MW_SINGLEBRACKET>#</MW_SINGLEBRACKET>
      1. is between 1 and the total number of agents in the game -- ie, the "Index" of the agent
  • agent Agent<MW_SINGLEBRACKET>id,#</MW_SINGLEBRACKET>
      1. is the id of the agent
  • agent Agent<MW_SINGLEBRACKET>NAME</MW_SINGLEBRACKET>
    • NAME is the name of the agent

Notes

  1. Searching by NAME or ID can be very detrimental to performance if used more than rarely. Therefore, scripters are urged to only search once by NAME or ID, then store the Agent's "Index" and use that for any other calls to that particular agent within your script. You will notice that using the "Index" is a LOT faster and more efficient than searching by ID or NAME.

Examples