SWEP.ShootEffects
From GMod Wiki
| Event Hook | |
| Hook Name | ShootEffects |
| Syntax | SWEP:ShootEffects( ) |
| Description | Triggers the firing animation and produces muzzle flash effects. |
| Returns | Nil |
| Lua State | |
| BBCode | [b][url=wiki.garrysmod.com/?title=SWEP.ShootEffects]SWEP.ShootEffects [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Definition of the function
Because it is a convenience function, it is defined by the game.(Source Code)
function SWEP:ShootEffects() self:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) // View model animation self.Owner:MuzzleFlash() // Crappy muzzle light self.Owner:SetAnimation( PLAYER_ATTACK1 ) // 3rd Person Animation end
Examples
Additional Notes
- You can override it to specify your animations and effects.
- To use it as such simply call self:ShootEffects()