-
Notifications
You must be signed in to change notification settings - Fork 24
Player.WeaponItem
Wesley Haws edited this page Apr 22, 2017
·
3 revisions
Settings for an item that represents a particular weapon or ammo. This items will be destroyed on successful pickup and will add the weapon/ammo to the players arsenal.
Note: This is used in combination with Floating Image script to make its more visual to the player.
Parameter | Description |
---|---|
overridePickupSound | If supplied will play this sound when the player presses your designated pickup button inside the sphere trigger. If not supplied it will attempt to find the weapon this is for using the type and index parameters. It will search your weapon manager for the target weapon gameobject and look at that weapons equip sounds and play one. If that weapon doesn't exist or doesn't have a sound nothing happens. |
pickupType | What weapon is this for? Note: if the type doesn't match then you can't pick this up. If the type is "Ammo" then you have to have at least 1 weapon equipped. If you do then it will add X number of clips to that weapon. |
amount | Number of clips to add to target weapon. |
weaponIndex | Index number of the weapon this is in your weaponmanager availableWeapons list. So if you want to equipped the weapon listed at availableWeapons[1], then type "1" here. |
pickupTag | Tag of the object allowed to interact with this item |
pickupString | String to display on target GUI. "" will always be replaced with your target input based on your selection from "ReplaceActionWith" Parameter. |
uiTextTag | The target GUI element that you will be displaying your "pickupString" parameter |
replaceActionWith | The key binding that you want to replace the text "" in your "pickupString" parameter. |
The following is a list of github repositories that made all of this possible:
delta patches: https://github.com/OctopusDeploy/Octodiff
.net 4 implemented in Monodevelop: https://github.com/mono/mono
Tuples In Unity: https://gist.github.com/michaelbartnett/5652076
Octodiff: https://github.com/OctopusDeploy/Octodiff
Input Manager: https://github.com/daemon3000/InputManager