Skip to content

Player.WeaponManager

Wesley Haws edited this page Apr 22, 2017 · 4 revisions

Weapon Manager


This is a list of equipped weapons, dropping weapons, and available weapons.

Parameter Description
equipweapons List of all available holding slots. That means if you want the player to only hold a max of 2 weapons only have 2 slots. If you want the player to have a max holding of 5 weapons have 5 slots. It doesn't matter if it is null. If it isn't null that means the player is currently holding that weapon. In the image above the player always contains "NoWeapon", but can't drop it because it's not in the list of available weapon drops (explained later).
availableweapons List of all weapons in the game. If the weapon doesn't exist in this array the player can't pick it up or use it. The order is important! The weapon must be at the same index as the dropweapons list.
dropweapons List of weapon items that will be dropped to represent an availableweapon that was dropped. The order is important! The dropped weapon at index 0, for example, must match the available weapon at index 0. In the above example you see that you cannot drop the "NoWeapon" because it is null at it's index. Therefore there is no available weapon to be dropped.
cycleWeaponWait How long you have to wait before a weapon is finished switching.
dropWeaponWait How long you have to hold your designated drop key before the weapon is dropped.
dropPosition Location the dropweapons index gameobject is instantiated at.
Clone this wiki locally