Forum posts

I attempted to reach out some time ago to the author, but they never responded. :(

After some tinkering, I was able to achieve the initial result I was looking for. Code can be found here. My approach was to get it working ok enough as a concept.
User posted image
User posted image
Hi!

Is there a tutorial on how to "pick up, hold, carry, and let go/throw that item" in the GoldSrc engine? More directly, pick up and throw back a loose hand grenade, or roughly stimulate the HL2 physics gun.

The way I am thinking right is the following:
1. If the player can see the entity, determine if close enough to pick up.
2. Manage if the item is "pickupable."
3. Pick up that item in front of the player's view and iterative through a think-loop, updating its angles/origin to where the player is looking, server-sided.
4. Throw item back on a player key bind, borrowing from the hand grenade weapon/snark/or satchel code.

I've searched the Internet for code or a tutorial on how best to "pick up and hold" an item in GoldSrc. After some digging, I could not find anything obvious. Yeah, GoldSrc predated this game mechanic, but being such a vital game concept and seeing it is done in other GoldSrc mods, I'm not sure why it hasn't been shared openly.

I am running a mod called Cold Ice Resurrection in which I'd like to add initial "carry/throw" support. Its code and assets are fully open. I will provide attribution for those that offer help.