trigger_changemaxammo

Modified

12-Jul-2023

This entity, when triggered, changes maximum ammo amount of selected ammo type, also allows to replenish ammo to maximum.

Keyvalues


OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.

Name targetname : Set name of trigger_changemaxammo so other entities can trigger it to change max ammo. Every trigger use-type works uniformly. Can be kill-targeted.

Trigger after fire target : Entity to trigger whenever trigger_changemaxammo is triggered. Trigger use-type is 'Toggle'.

Ammo name message : Choose ammo type to change ammo limit from drop-down menu.

  • "9mm" : 9mm Rounds
  • "bolts" : Crossbow Bolts
  • "357" : .357 Rounds
  • "uranium" : Uranium Ammo
  • "Hand Grenade" : Hand Grenades
  • "Hornets" : Hornets
  • "556" : 5.56 Rounds
  • "ARgrenades" : AR Grenades
  • "health" : Health (Medkit Ammo)
  • "rockets" : Rockets
  • "Satchel Charge" : Satchel Charges
  • "shock charges" : Shock Rifle Ammo
  • "buckshot" : Shotgun Ammo
  • "m40a1" : Sniper Rifle Ammo
  • "sporeclip" : Spore Launcher Ammo
  • "Snarks" : Snarks
  • "Trip Mine" : Trip Mines

Value to use m_iMaxAmmo : Value to use along with "Change max ammo mode".

Change Max Ammo Mode m_Mode : Set up the way the new ammo limit is modified.

  • 0 : Set : "Value to use" is now maximum ammo amount.
  • 1 : Reset : "Value to use" is added to the current maximum ammo amount.
  • 2 : Add : "Value to use" is subtracted from the current maximum ammo amount.
  • 3 : Subtract : Maximum ammo amount is reverted to it's default value.

Flags


  • 1 : All players : Apply new ammo limit rules to all players (normally, the amount affects only '!activator').

  • 2 : Remove excess ammo : Remove ammo limit completely.

  • 4 : Set ammo to new max : Replenishes player(s) ammo to maximum.