Raised This Month: $ Target: $400
 0% 

[TF2] Toss Buildings


Post New Thread Reply   
 
Thread Tools Display Modes
Author
reBane
Senior Member
Join Date: May 2020
Plugin ID:
8066
Plugin Version:
23w01a
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    21 
    Plugin Description:
    Toss your buildings as engi
    Old 05-26-2022 , 14:05   [TF2] Toss Buildings
    Reply With Quote #1

    Toss Buildings

    Pretty simple idea: Engi can now throw his buildings while carrying them. To throw buildings, press your Reload key. They will construct while in air, bounce off walls and finally be usable at the desitnation. You can't throw during Waiting For Players, If a building lands in a spawn room or sticks into other things, it will blow up.

    Credits to zen for the idea

    Dependencies
    ConVars
    • sm_toss_building_types "dispenser teleporter sentrygun" - Space separated building types that can be tossed. Remove a word to block that building from being tossed.
    • sm_toss_building_force 520 - The force with with to yeet the buildings. 520 felt good, 320 still works, idk keep it default i guess.
    • sm_toss_building_upright 0 - How much to pull the prop upright in degree/sec. Will somethwat prevent the prop twriling, 0 to disable.
    • sm_toss_building_breakoob "dispenser teleporter sentrygun" - Space separated list of building names that break out of bounds: Dispenser Teleporter Sentrygun.
    • sm_toss_building_allowstacking 0 - Set to 1 to allow tossing builings on top of each other.
    • sm_toss_building_version - Version convar for version
    ConVars go into cfg/sourcemod/plugin.tossbuildings.cfg.

    Custom Attribute

    This plugin also works as custom attribute. It is recommendedto use Hidden dev attributes, but custom attributes is also supported.

    I'm not too familiar with hidden dev attributes, but the entry should probably look something like this (Don't forget to give it a unique id aka number somewhere above 4000):
    PHP Code:
    //Allows to throw buildings as engi
    "4269"
    {
        
    "name"    "toss buildings"
        "attribute_class"    "toss buildings"
        "description_format"    "value_is_additive"
        "stored_as_integer"    "1"

    Add the "toss buildings" attribute to the building tool (base item def index 28) with the following values (add up to combine):
    1 - Dispenser , 2 - Teleporter , 4 - Sentrygun.
    The attribute overrides the config value.

    Please tell me if somethings not working with that, I still might have to adjust some checks.

    Library

    Other plugins can listen to buildings being tossed and landing. For more info check the include. If you block a building from being tossed, maybe tell the player why it's blocked (UX is important, mmkay).

    Don't forget to to add the gamedata file

    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo

    Last edited by reBane; 01-04-2023 at 09:01. Reason: Update to 23w01a
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 05-27-2022 , 06:31   Re: [TF2] Toss Buildings
    Reply With Quote #2

    Update 22w21b
    * Fixed weird crash when no building is held by the build tool
    * Added Version ConVar
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    lugui
    Senior Member
    Join Date: Feb 2016
    Location: GetClientAbsOrigin();
    Old 05-27-2022 , 10:01   Re: [TF2] Toss Buildings
    Reply With Quote #3

    damn this sounds funny
    add a video to the post =P
    __________________
    Add me for commissions!
    Steam: [U:1:88621772]
    Discord: lugui#0889
    My Plugins
    lugui is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 05-28-2022 , 11:51   Re: [TF2] Toss Buildings
    Reply With Quote #4

    Is this similar to that old video of either FlaminSarge's or Pelipoikas where he whips a teleporter into the air and it still teleports a person while flying through the air?
    404UserNotFound is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 05-28-2022 , 12:43   Re: [TF2] Toss Buildings
    Reply With Quote #5

    No you have to pickup the buildings. While it's thrown, it's most likely still constructing. But if you manage to get a exit airborne for construction time + teleport cooldown, you might be able to tp through before it lands.
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 06-01-2022 , 11:31   Re: [TF2] Toss Buildings
    Reply With Quote #6

    Update to 22w22a
    * Added ConVars to control building types and force for tossing
    * Added forwards to integrate with other plugins
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 06-12-2022 , 10:02   Re: [TF2] Toss Buildings
    Reply With Quote #7

    Update to 22w23b
    * Made tossing more reliable, landing on slopes
    * Buildings will only start building once they landed
    * Picking up airborn objects no longer leaves ghost props
    * Buildings can now be thrown through players but will break if landing in players
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo

    Last edited by reBane; 06-12-2022 at 10:12.
    reBane is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 06-12-2022 , 17:12   Re: [TF2] Toss Buildings
    Reply With Quote #8

    Would it be possible to make it so people can't throw buildings out of bounds or pass things like player clips, func_respawnroomvisualizer, etc?
    I had a user who kept throwing their sentries in inaccessibles area to keep killing players or to access offlimit areas via engineer teleport throwing.

    Last edited by Sreaper; 06-12-2022 at 17:13.
    Sreaper is offline
    404UserNotFound
    BANNED
    Join Date: Dec 2011
    Old 06-12-2022 , 20:06   Re: [TF2] Toss Buildings
    Reply With Quote #9

    Definitely possible in numerous ways. Could use that electric fizzle-out death effect to fizzle out buildings of any variety that get tossed into a respawn room of an opposing team. That'd be the neatest way to handle it in my opinion. Or just re-use the functionality of the building breaking when it lands inside a player and do the same thing for if it lands in an enemy respawn room.

    Last edited by 404UserNotFound; 06-12-2022 at 20:07.
    404UserNotFound is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 06-12-2022 , 21:54   Re: [TF2] Toss Buildings
    Reply With Quote #10

    Quote:
    Originally Posted by TF2CutContentWiki View Post
    Definitely possible in numerous ways. Could use that electric fizzle-out death effect to fizzle out buildings of any variety that get tossed into a respawn room of an opposing team. That'd be the neatest way to handle it in my opinion. Or just re-use the functionality of the building breaking when it lands inside a player and do the same thing for if it lands in an enemy respawn room.
    He already checks if it lands inside of a respawn room and destroys them accordingly. My issues are more with player clips and visualizers that don't have respawn rooms near them.
    Sreaper 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 16:08.


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