Raised This Month: $ Target: $400
 0% 

[TF2] Gravity Hands


Post New Thread Reply   
 
Thread Tools Display Modes
Author
reBane
Senior Member
Join Date: May 2020
Plugin ID:
7977
Plugin Version:
23w05a
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Gravity Gun / Physics Cannon like prop handling for TF2
    Old 02-25-2022 , 11:55   [TF2] Gravity Hands
    Reply With Quote #1

    TF2 Gravity Hands

    I want to make puzzle/coop maps for TF2 similar to HL2DM Puzzle servers. This requires a gravity gun in most cases to move around props, so this is the main aspect.

    For now I'll only implement the Gravity Gun, a separate plugin for custom map logic is planned, but I'm waiting for the new entity lump API in SM 1.11 that hopefully is as flexible as nosoop's draft.

    But why am I not using TF2_PhysicsGun or Gravity Gun Mod?
    Well simply put those plugin are too powerful for what I want. Those plugins implement a Super-PhysGun style of prop handling while I want a normal Gravity Gun behaviour of pull stuff, pick it up and throw it. After all, every player is supposed to be allowed to manipulate props with it, and that in the style of HL2DM Puzzle maps!

    Holster Weapons

    Players can use /hands or /holster to put away their weapons (`+attack3` while holding the melee is currently aliased to this as well, but I might change that in the future). This equips players with non-damaging fists (breaking heavys stock fists in the process but whatever). Physics props below a mass of 250 can be moved around with right click and can be punted away. It tries to fire apropriate physgun related outputs and to honor frozen and motion disabled props.

    Left-clicking while holding a prop will punt it, otherwise left-click is just a normal melee punch.

    I know that it's not perfect and you can work props through walls, but it should work well enough (aka I don't know how to fix that lul). Also due to how holstering is handled, melee weapons will loose most customizations when unholstered (Decals, names, ...).

    Config

    The config is auto created in the usual spot int cfg/sourcemod/plugin.tf2gravihands.cfg with the following values:
    Code:
    tf2gravihands_maxmass 250.0 - Max weight, the hands can pick up
    tf2gravihands_throwforce 1000.0 - Multiplier used when throwing props
    tf2gravihands_dropdistance 200.0 - Props get dropped when they move more than this distance from the grab point
    tf2gravihands_grabdistance 120.0 - Maximum distance to grab stuff from, 0 to disable
    tf2gravihands_pulldistance 850.0 - Maximum distance to pull props from, 0 to disable
    tf2gravihands_pullforce_far 400.0 - Pull force to apply per tick when at max pull distance
    tf2gravihands_pullforce_near 1000.0 - Theoretic pull force to apply per tick when at the player
    tf2gravihands_sounds global - Sound engine configuration for Gravity Hands: global|player|disable
    tf2gravihands_enabled 2 - 0=Disabled; 1=Only allow players to /holster their weapon (w/o T-Posing); 2=Enable Gravity Hands
    Natives and Forwards

    Plugin developers get rich access to the GraviHand feature, being allowed to check when melee weapons are (un)holstered as well as limited control over what physics entities can be picked up.

    Check the include file for more info.

    Dependencies
    Get it on GitHub
    Source Code
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo

    Last edited by reBane; 02-03-2023 at 14:46. Reason: Update to 23w05a
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 10-14-2022 , 11:42   Re: [TF2] Gravity Hands
    Reply With Quote #2

    Update to 22w41a
    * Improved prop handling

    Moral of the story: smlib is old and some stuff it does no longer / does not work for tf2 i guess. Anyways it should feel even more like the gravity gun now.
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 10-30-2022 , 17:30   Re: [TF2] Gravity Hands
    Reply With Quote #3

    Update to 22w43a
    * Added a native for other plugins to force (un)holster weapons
    * Renamed the get holster function to be in line with the set holster function name
    * Changed the behaviour of grabbing entities to be "click attack2" instead of "hold attack2"
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 11-01-2022 , 08:19   Re: [TF2] Gravity Hands
    Reply With Quote #4

    Update to 22w44a
    * Improved button suppression while weapons are stripped/holstered (fixed demo chargeing after i broke the fragile system in the previous release)
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 12-22-2022 , 06:50   Re: [TF2] Gravity Hands
    Reply With Quote #5

    Update to 22w51a
    * Fixed some inconsistencies and issues with the click-click system
    * Added the hold-loop sound (slightly reduced volume)
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 01-04-2023 , 07:50   Re: [TF2] Gravity Hands
    Reply With Quote #6

    Update to 23w01a
    * Fixed props floating/getting stuck when switching weapons while holding a prop
    * Changed method for setting collision groups, so the physics mayhem bug should not occur anymore
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo

    Last edited by reBane; 01-08-2023 at 10:30.
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 01-08-2023 , 10:30   Re: [TF2] Gravity Hands
    Reply With Quote #7

    Update to 23w01b
    * Fixed damage from tossed props not tracking by rewriting the prop tracking
    * Improved sound emitting when pulling entities
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 01-18-2023 , 12:06   Re: [TF2] Gravity Hands
    Reply With Quote #8

    Update to 23w03a
    * Fixed a bug where the unarmed state had gravity hand features enabled (as if /hands was used)
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    PC Gamer
    Veteran Member
    Join Date: Mar 2014
    Old 01-19-2023 , 19:17   Re: [TF2] Gravity Hands
    Reply With Quote #9

    Would you be willing to make a Darth Vader plugin using this technology? I'd like to see a playable Darth Vader where the player can view an enemy and press left-click to pull the enemy towards the player, rise them up off the ground, and choke them. If you press right-click the viewed enemy would be force pushed away from you.

    It would go well with my playable Jedi plugin: https://www.youtube.com/watch?v=0x2WVw4bZs4
    PC Gamer is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 01-20-2023 , 06:53   Re: [TF2] Gravity Hands
    Reply With Quote #10

    There's already this grabber plugin I think we use on our server for mods. But I can somehow integrate that based on permissions, sure. Giving mods a super physcannon equivalent sounds fun.
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 23:48.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode