Raised This Month: $ Target: $400
 0% 

[TF2] Toss Buildings


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
reBane
Senior Member
Join Date: May 2020
Plugin ID:
8066
Plugin Version:
24w08a
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    16 
    Plugin Description:
    Toss your buildings as engi
    Old 05-26-2022 , 13: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 & LibrariesListingGitHubDosMikeTools ▶ ToDo

    Last edited by reBane; 02-24-2024 at 05:08. Reason: Update to 24w08a
    reBane is offline
     



    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 10:52.


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