Commands/Lua

Reference for console commands, Lua hooks and Lua commands in CS2D.

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Lua Command Lua Commands

Category: all (86)

Lua Command ai_findtarget

Categories

Parameters

  • id

Info

Returns the ID of the closest enemy to the player with the specified ID or 0 when no enemy was found. Only players which are close enough (inside the virtual screen of the player) will be returned. When fog of war is enabled players behind walls won't be returned.

Note: bot_skill has a slight impact on the size of the virtual screen of bots. Bots with a high skill will 'see' enemies slightly earlier than bots with a low skill.