Skip to end of metadata
Go to start of metadata

BO3 now treats weapons as entities instead of just strings. In order to do any weapon operations, you must first initialize a weapon variable from the string name:

function testfunction(parameter)
{
	string = "smg_standard";
	weapon = getWeapon(string); //initialize the weapon
	self giveWeapon(weapon); //giving an entity instead of just a string now.
	self GiveMaxAmmo(weapon);
	self SwitchToWeapon(weapon);
}


Weapon Stats are now stored as fields of the weapon entitiy instead of obtained from engine functions:

function testfunction(parameter)
{
	string = "smg_standard";
	weapon = getWeapon(string);
	displayName = weapon.displayName;
	ammo = weapon.ammo;
}

For a list of the weapon fields on weapon entities in script, see BO3 | Weapon entity field list

  • No labels