Jump to content

Addweapon

From EDukeWiki
(Redirected from Addweaponvar)

addweapon <weapon> <amount>

addweaponvar <weapon> <amount>


Gives the specified <weapon> with <amount> ammo to the nearest player.

Commands with an additional "var" suffix take gamevars rather than constants or defined labels for their inputs. As an alternate short form, "varvar" can be dropped from these commands; for example ife serves an an alias for ifvarvare.

WARNING: If the player already has full ammo for the specified <weapon>, execution of subsequent code is halted in a fashion similar to return.

However, if the player has full ammo, but doesn't have the weapon in question, the subsequent code will be executed.

Weapon Reference

The following table lists the available weapons in Duke Nukem 3D and its expansions, along with their internal index.

ExposedValueLabelDescription
No0KNEE_WEAPONMighty Foot. Always available.
No1PISTOL_WEAPONPistol. Player starts with this weapon unless the start is located on a HURTRAIL tile (picnum 859).
No2SHOTGUN_WEAPONShotgun
No3CHAINGUN_WEAPON"Ripper" Chaingun
No4RPG_WEAPONRocket Launcher (RPG)
No5HANDBOMB_WEAPONPipebomb
No6SHRINKER_WEAPONShrinker
No7DEVISTATOR_WEAPONDevastator
No8TRIPBOMB_WEAPONLaser Tripbomb
No9FREEZE_WEAPONFreezethrower
No10HANDREMOTE_WEAPONPipebomb Detonator
No11GROW_WEAPONExpander (Plutonium Pack/Atomic Edition only)
No12FLAMETHROWER_WEAPONIncinerator (World Tour only)


Defines
define KNEE_WEAPON                        0
define PISTOL_WEAPON                      1
define SHOTGUN_WEAPON                     2
define CHAINGUN_WEAPON                    3
define RPG_WEAPON                         4
define HANDBOMB_WEAPON                    5
define SHRINKER_WEAPON                    6
define DEVISTATOR_WEAPON                  7
define TRIPBOMB_WEAPON                    8
define FREEZE_WEAPON                      9
define HANDREMOTE_WEAPON                 10
define GROW_WEAPON                       11
define FLAMETHROWER_WEAPON               12