WEAPON namespace JJ2+

Weapons and their styles

Enums

enum Style { NORMAL, MISSILE, POPCORN, CAPPED, TUNA deprecated } JJ2+
How a weapon fires while the fire key is held
enum Weapon { BLASTER = 1, BOUNCER = 2, ICE = 3, SEEKER = 4, RF = 5, TOASTER = 6, TNT = 7, GUN8 = 8, GUN9 = 9, CURRENT = 0 } JJ2+
Weapon a player can use

Enum documentation

enum WEAPON::Style JJ2+

How a weapon fires while the fire key is held

Used by jjWEAPON::style.

Enumerators
NORMAL

Fires repeatedly, as fast as jjPLAYER::fastfire allows

MISSILE

Fires once per press of the fire key

POPCORN

Fires repeatedly by jjPLAYER::fastfire, but never faster than a fixed limit

CAPPED

Like NORMAL, but pressing fire faster doesn't beat jjPLAYER::fastfire

TUNA

Older name of CAPPED

enum WEAPON::Weapon JJ2+

Weapon a player can use

Numbered from 1, so plain numbers 1 to 9 work in their place, e.g. as an index of jjPLAYER::ammo or jjWeapons.

Enumerators
BLASTER
BOUNCER
ICE
SEEKER
RF
TOASTER
TNT
GUN8

Pepper spray, or the fireball gun when it is enabled

GUN9

Electro blaster, or the blade gun when it is enabled

CURRENT

The weapon the player has selected