Commands/Lua

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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Category: all (73)

Lua Hook shieldhit

Categories

Parameters

  • id: player id (shield carrier)
  • source: source player id or 0 (the attacker)
  • weapon: weapon type / source type id
  • attackdirection: 1 front, 2 back/side
  • attacker object id: id of dynamic object that caused the hit (or 0 if not hit by object)
  • damage: the blocked damaged

Info

Whenever the tactical shield of a player is hit by a regular firearm or laser.
weapon can be a weapon type ID or a special source ID.

Weapon and item type IDs:
items

Special source IDs:
killids

attackdirection is 1 when the shield is hit from the front, and 2 when it is hit from any other direction (back/sides)
Attack from sides (direction 2) will only be triggered when hitting teammates with a shield, otherwise a normal hit hook will be triggered.

Note: Tactical shields only block conventional bullets and lasers. All other weapons (explosions, rockets, grenades, ...) are NOT blocked by shields and will not trigger this hook!

Return Values

none - related action(s) [if there are any] performed by CS2D cannot be altered/omitted

Lua Command Lua Commands