-
Notifications
You must be signed in to change notification settings - Fork 1
Where to add custom lua to a weapon
The different stages (functions) of where you can implement custom lua into each base are described below. Please note that the gun base & battery base are heavily intertwined, so some functions in the gun base are applicable to the battery base as well. If there is somewhere you need a custom function injected to work for your project/weapon, feel free to ask me through Steam/Discord or submitting it as a new issue on this github.
-
SWEP:DoCustomReloadStartEvents()
Called when a reload is successfully initiated, no args. Not called by manual reloading (yet) -
SWEP:DoCustomReloadEndEvents()
See above, but s/initiated/ended/ -
SWEP:DoCustomPrimaryAttackEvents()
Self explanatory, but only called when an attack is valid (can fire). -
DoCustomSecondaryAttackEvents()
See above. -
SWEP:DoScriptedSecondaryAttack()
todo: fix
-
SWEP:DoCustomVentEvents()
Called when a weapon has started venting, not overheating. -
SWEP:DoCustomVentHoldEvents()
When the venting function loops from being held. -
SWEP:DoCustomFinishVentEvents()
Called when a vent is finished. -
SWEP:DoCustomOverheatEvents()
Called when the weapon overheats.