Garry's Mod Wiki

WEAPON:NPCShoot_Secondary

  WEAPON:NPCShoot_Secondary( Vector shootPos = GetShootPos(), Vector shootDir = GetAimVector() )

Description

A utility function to seperate your SWEPs secondary firing from players.

Unlike WEAPON:NPCShoot_Primary, this won't be called by the engine for TASK_RANGE_ATTACK2.

Arguments

1 Vector shootPos = GetShootPos()
The world position the NPC will use as attack starting position. You can create your projectiles here.
2 Vector shootDir = GetAimVector()
The direction the NPC wants to shoot at.