Addweapon: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
addweapon <weapon> <amount>
<span {{code}}>'''addweapon''' <weapon> <amount> </span>
 
<span {{code}}>'''addweaponvar''' <weapon> <amount> </span>
 
 
Gives the specified ''<weapon>'' with ''<amount>'' ammo to the nearest player.
 
{{varsuffix}}
 
'''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==
{{Weapons}}


Adds a weapon to the nearest player.  <weapon> is the weapon's number, <amount> is the amount of ammo.  See [[addweaponvar]].


[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Duke3D 1.3/1.5 commands]]
[[Category:Player manipulation]]
[[Category:Player manipulation]]

Latest revision as of 16:09, 17 November 2021

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.

Exposed Value Label Description
No 0 KNEE_WEAPON Mighty Foot. Always available.
No 1 PISTOL_WEAPON Pistol. Player starts with this weapon unless the start is located on a HURTRAIL tile (picnum 859).
No 2 SHOTGUN_WEAPON Shotgun
No 3 CHAINGUN_WEAPON "Ripper" Chaingun
No 4 RPG_WEAPON Rocket Launcher (RPG)
No 5 HANDBOMB_WEAPON Pipebomb
No 6 SHRINKER_WEAPON Shrinker
No 7 DEVISTATOR_WEAPON Devastator
No 8 TRIPBOMB_WEAPON Laser Tripbomb
No 9 FREEZE_WEAPON Freezethrower
No 10 HANDREMOTE_WEAPON Pipebomb Detonator
No 11 GROW_WEAPON Expander (Plutonium Pack/Atomic Edition only)
No 12 FLAMETHROWER_WEAPON Incinerator (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