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

MvM / Spawned Sentry + Sentry Busters


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-10-2014 , 18:56   MvM / Spawned Sentry + Sentry Busters
Reply With Quote #1

What Do? The sentry busters will path to spawned sentry, and will detonate, but won't destroy it. Robots will shoot them and kill them though. Here's my spawning code:

PHP Code:
        new sentry CreateEntityByName("obj_sentrygun");
        if (
sentry != -1)
        {
            
decl Float:normal[3], Float:normalAng[3];    
            
TR_GetPlaneNormal(TraceRaynormal);

            
GetClientEyeAngles(targetAngles);
            
GetVectorAngles(normalnormalAng);
                
            if(
normalAng[0] > 0.0 && normalAng[0] <= 90.0)
            {
                
CloseHandle(TraceRay);
                return;
            }
                
            
EndOrigin[0] += normal[0]*2.0;
            
EndOrigin[1] += normal[1]*2.0;
            
EndOrigin[2] += normal[2]*2.0;
                
            
Angles[0]  = normalAng[0] -270;

            if (
normalAng[0] != 270)
            {
                
Angles[1]  = normalAng[1];
            }

            
DispatchKeyValueVector(sentry"origin"EndOrigin);
            
DispatchKeyValueVector(sentry"angles"Angles);

            
DispatchSpawn(sentry);

            
SetEntityModel(sentryMODEL_SENTRYGUN);
            
SetEntPropFloat(sentryProp_Send"m_flModelScale"0.5);    

            
ActivateEntity(sentry);

            
SetEntProp(sentryProp_Send"m_iAmmoShells"200);
            
SetEntProp(sentryProp_Send"m_iMaxHealth"100);
            
SetEntProp(sentryProp_Send"m_iHealth"100);
            
SetEntProp(sentryProp_Send"m_iObjectType"_:TFObject_Sentry);
            
SetEntProp(sentryProp_Send"m_iState"1);

            
SetEntProp(sentryProp_Send"m_iTeamNum"2);
            
SetEntProp(sentryProp_Send"m_nSkin"0);
            
SetEntProp(sentryProp_Send"m_iUpgradeLevel"1);
            
SetEntProp(sentryProp_Send"m_iAmmoRockets"0);
            
//SetEntProp(sentry, Prop_Send, "m_bMiniBuilding", 1);

            
SetEntPropFloat(sentryProp_Send"m_flPercentageConstructed"1.0);

            
SetEntProp(sentryProp_Send"m_bDisabled"1);
            
SetEntProp(sentryProp_Send"m_CollisionGroup"2);
        } 
Probly don't need the angle checks, since the sentries will always spawn downward, though every now and again one will be tilted enough that it may orient sideways enough to not fire (dunno). I spawn them disabled so that nobody will get stuck in them, then make them solid later with a tracehull.

There's probably some netprop that needs to be set somewhere to make the sentries die to them. Also, It would be nice to make it so they can't be wrangled (like the mini sentry). I mean, they can be wrangled, but they won't fire, they just disabled and show the laser sight.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 01-10-2014 , 20:12   Re: MvM / Spawned Sentry + Sentry Busters
Reply With Quote #2

It might require an owner.
bl4nk is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-10-2014 , 22:37   Re: MvM / Spawned Sentry + Sentry Busters
Reply With Quote #3

I set the owner and enabled in the timer, which makes it solid and activated, so it gets one, Just don't want the owner to become trapped inside of it. I only grant them to engineers.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-11-2014 , 22:00   Re: MvM / Spawned Sentry + Sentry Busters
Reply With Quote #4

Looked this over more today, setting the owner, effectentity, etc does nothing.
Alsl, seems about any relevant netprop on a valid building is -1, so I don't know. Even in mvm the disposable sentries do not seem to get the disposable netprop set on them, its also -1.

Could be i'm completely lost, or the info is just stored somewhere else :/
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Reply



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:47.


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