Give N Take – Interneted Version
Thank you, patience and mistakes.
After some more deep VScript learning, I decided to force myself to make my own assessment, which is to make my own version of Give N Take by MANACAT from scratch, it took me a few days until I am satisfied with the result.
I am publishing it in case anyone is comfortable using this.
Description
This simple script add-on allows you to give and exchange items to your fellow survivors and take bot survivors’ items.
Features and notes:
- To take the bots’ items, you need to shove the bots while holding your walking bind (default is SHIFT), you can’t shove them from a distance.
- To take the incapacitated bots’ items, you need to hold your walking bind (default is SHIFT), and then revive them.
- To give and exchange, you can shove the survivor from a distance while holding the item.
- Taking items only works on survivor bots. For exchanging, you need to set enablePlayerExchange in the ems to exchange with players, the mechanic is different from bots, see the pinned discussion to see how it works.
- If you are holding a medkit, you must hold your walking bind in order to give or exchange, default is SHIFT.
- You can still give and exchange if your target is incapacitated or dominated by a special infected.
- You cannot take bots’ items when you are not holding anything (you can’t shove), in other words, only with shoving.
- Additions to make it consistent with the temporary health items’ mechanic:
- The survivors will speak their responses, they will also speak as they have never known the survivors’ names.
- Emiting the big reward sound to the shover, and small reward sound to the rest of the survivors.
- Giving and exchanging’s range should be approximately close to the original mechanic.
- Giver and exchanger will switch to their primary or secondary weapon when the action is done.
- Include configurable settings, see the pinned discussion for more information.
- Only works on local/dedicated servers.
Inspired by smilzo’s Left 4 Bots and MANACAT’s Give N Take, Special thanks to those VScripters who have helped me too along the way.