Skip to content

Base Weapon

Blixibon edited this page Sep 26, 2019 · 2 revisions

Inputs


  • SetAmmo1 <integer> - Sets the weapon's currently loaded primary ammo.
  • SetAmmo2 <integer> - Sets the weapon's currently loaded secondary ammo.
  • GiveDefaultAmmo <void> - Resets the weapon's loaded ammo to "default", which is usually the max.

  • EnablePlayerPickup <void> - Enables player pickup if it was disabled before.
  • DisablePlayerPickup <void> - Disables player pickup if it was enabled before.
  • EnableNPCPickup <void> - Enables NPC pickup if it was disabled before.
  • DisableNPCPickup <void> - Disables NPC pickup if it was enabled before.

  • BreakConstraint <void> - If the weapon was set to start constrained, this input breaks its constraint.

  • ForcePrimaryFire <void> - Forces the weapon to trigger its primary attack one time. This is supported on most guns, although implementation is weapon-specific and may function differently from weapon to weapon.
  • ForceSecondaryFire <void> - Forces the weapon to trigger its secondary attack one time. This is supported on most guns, although implementation is weapon-specific and may function differently from weapon to weapon.

Outputs


  • OnDropped <void> - Fires when dropped by a NPC or player, passing the dropper as the activator.

KeyValues


  • Ammo 1 <integer> - Sets the weapon's currently loaded primary ammo. Requires the "Preserve ammo" spawnflag to function.
  • Ammo 2 <integer> - Sets the weapon's currently loaded secondary ammo. Requires the "Preserve ammo" spawnflag to function.

NPC/player interaction with weapons

Mapbase adds a bunch of weapon-related I/O/KV to NPCs and players.

Clone this wiki locally