Raised This Month: $12 Target: $400
 3% 

[TF2] Remote Control/Build/Limit buildings plugin


Post New Thread Reply   
 
Thread Tools Display Modes
naris
AlliedModders Donor
Join Date: Dec 2006
Old 01-05-2013 , 19:22   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #101

Quote:
Originally Posted by Roundcat View Post
Hey Naris - thanks for this plugin. If you do an update could you add the function to choose which classes can build objects please?
I can look into that when I find the time (I have been working 80+ hours/week for the past several months, but hopefully my workload will reduce somewhat in the near future)

Quote:
Originally Posted by Roundcat View Post
Currently editing the /tf/scripts/objects.txt file to allow engineers to build any more than 1 sentry breaks the code and enables them to actually build unlimited sentries - so Im hoping this plugin would override that?
set sm_build_objects_txt to 1 if you have modified objects.txt

Last edited by naris; 01-05-2013 at 19:23.
naris is offline
IWasHere
Junior Member
Join Date: Feb 2013
Old 02-02-2013 , 20:00   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #102

The plugin crashes the server on startup. I'm using the latest sourcemod release and don't have any other plugins installed. Help? D:

Okay, disregard that. I got it to work.

But is there any way to make it so buildings won't spawn inside of me?

Last edited by IWasHere; 02-03-2013 at 01:36.
IWasHere is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 02-03-2013 , 14:22   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #103

Quote:
Originally Posted by IWasHere View Post
But is there any way to make it so buildings won't spawn inside of me?
It builds the object where you are standing, then it either teleports you on top of the object (if it's a teleporter) or changes the collision group of the object so you don't get stuck inside it.

Currently, there is no way to change that behaviour.
naris is offline
IWasHere
Junior Member
Join Date: Feb 2013
Old 02-03-2013 , 17:14   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #104

Huh, oh well. I've also noticed that I cannot spawn a sentry gun through the menu/commands, and all buildings spawned through the menu/command apparently count as enemy buildings, causing bots (and I) to destroy them.
IWasHere is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 02-26-2013 , 09:41   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #105

When used in MvM servers, this plugin disables mini-sentry upgrades.
Mr. Man is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 04-21-2015 , 15:42   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #106

What exactly happens if you set a sentry's level to "4"?

Can you not do this with dispensers and teleporters? The stocks block that.
__________________
Chdata is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 04-21-2015 , 19:26   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #107

Quote:
Originally Posted by Chdata View Post
What exactly happens if you set a sentry's level to "4"?

Can you not do this with dispensers and teleporters? The stocks block that.
It builds a level 3 sentry with more health, rockets and ammo than a regular level 3 sentry.
Level 5 sets the health, rocket and ammo to the max amounts.

At least I think that's what it does after looking through the code, I have been working a bazillion hours so I have not had time to work on this or play a game in a couple of years

Here are the amounts of Shells(Ammo), Rockets and Health for the various levels.

Code:
    // Max Sentry Ammo for Level:         mini,   1,   2,   3, max
    stock const TF2_MaxSentryShells[]  = { 150, 100, 120, 144,  255 };
    stock const TF2_MaxSentryRockets[] = {   0,   0,   0,  20,   63 };
    stock const TF2_SentryHealth[]     = { 100, 150, 180, 216, 8191 };

Last edited by naris; 04-21-2015 at 19:27.
naris is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 04-22-2015 , 09:00   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #108

Eh, I tried setting HighestUpgradeLevel and UpgradeLevel to 3 during player_builtobject, but it didn't change my dispenser or teleporters in such a way that you can upgrade them to level 4. And infact, I couldn't make them level 4 by setting UpgradeLevel.

I tried making a level 4 minisentry too, but haven't tried it on normal sentry yet.


I also tried making a stock to instantly change a building to level 3 [to use during player_objbuild while the building is still in the "isbuilding state"].

PHP Code:
stock InstantBuild(iBuildingTFObjectType:iObject)
{
    
SetEntProp(iBuildingProp_Send"m_bBuilding"02);
    
SetEntProp(iBuildingProp_Send"m_bClientSideFrameReset"02);
    
SetEntPropFloat(iBuildingProp_Send"m_flPercentageConstructed"1.0);
    
SetEntPropFloat(iBuildingProp_Send"m_flPlaybackRate"0.0);
    
SetEntProp(iBuildingProp_Send"m_iState"11);
    
SetEntProp(iBuildingProp_Send"m_nNewSequenceParity"2);
    
SetEntProp(iBuildingProp_Send"m_nResetEventsParity"2);

    switch (
iObject)
    {
        
// case TFObject_Sentry:
        // {
        //     SetEntProp(iBuilding, Prop_Send, "m_nModelIndex", g_iSentModel);
        // }
        
case TFObject_Dispenser:
        {
            
SetEntProp(iBuildingProp_Send"m_nModelIndex"g_iDispModel);
        }
        case 
TFObject_Teleporter:
        {
            
SetEntProp(iBuildingProp_Send"m_nModelIndex"g_iTeleModel);
        }
    }

    
//SetEntProp(iBuilding, Prop_Send, "m_bBuilding", 1, 2);
    //SetEntProp(iBuilding, Prop_Send, "m_bClientSideFrameReset", 1, 2);
    //SetEntPropFloat(iBuilding, Prop_Send, "m_flPercentageConstructed", 0.995);
    //SetEntPropFloat(iBuilding, Prop_Send, "m_flPlaybackRate", 0.5);
    //SetEntProp(iBuilding, Prop_Send, "m_iState", 0, 1);
    //SetEntProp(iBuilding, Prop_Send, "m_nNewSequenceParity", 1);
    //SetEntProp(iBuilding, Prop_Send, "m_nResetEventsParity", 1);

However this seems to turn it into a dud until you pick it up and set it back down, and it gets rid of whatever health you give it via

PHP Code:
            SetVariantInt(648);
            
AcceptEntityInput(iBuilding"SetHealth");
            
//SetEntityHealth(iBuilding, 648); 


-----------------------

I was hoping to make a level 4 dispenser [gives overheal] and level 4 teleporter [gives TFCond_SpeedBuffAlly]. The only other way I can imagine is to just use SyncHudText and make it auto-upgrade if it remains active uninterrupted for X seconds [based on how long it would take to upgrade a building if you constantly hit it]. Interruptions being pickup/place/takedamage.
__________________

Last edited by Chdata; 04-22-2015 at 09:03.
Chdata is offline
naris
AlliedModders Donor
Join Date: Dec 2006
Old 04-22-2015 , 19:13   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #109

Quote:
Originally Posted by Chdata View Post
Eh, I tried setting HighestUpgradeLevel and UpgradeLevel to 3 during player_builtobject, but it didn't change my dispenser or teleporters in such a way that you can upgrade them to level 4. And infact, I couldn't make them level 4 by setting UpgradeLevel.

I tried making a level 4 minisentry too, but haven't tried it on normal sentry yet.

I was hoping to make a level 4 dispenser [gives overheal] and level 4 teleporter [gives TFCond_SpeedBuffAlly]
The last time I worked on this, a couple years ago, there were no level 4 anything. My plugin faked level 4 or 5 by increasing the attributes but setting m_iUpgradeLevel to 3. I seem to recall that using values > 3 caused odd things to happen. I also was unable to get teleporters or dispensers to work without having to pick them up and put them back down.
naris is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 04-25-2015 , 03:12   Re: [TF2] Remote Control/Build/Limit buildings plugin
Reply With Quote #110

Self upgrading buildings it is then.
__________________
Chdata 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 17:37.


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