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

[TF2] Disabling a Control Point


Post New Thread Reply   
 
Thread Tools Display Modes
Vincenator
Member
Join Date: Aug 2009
Old 08-07-2009 , 01:15   Re: [TF2] Disabling a Control Point
Reply With Quote #11

When I do the following (at one minute and five seconds into the game), it look like the control point disappears for a second, but a split-second later the server (I think) crashes.

Code:
new ent = -1;
while ((ent = FindEntityByClassname(ent, "team_control_point")) != -1)
{
    RemoveEdict(ent);
}
And doing the same thing but with AcceptEntityImput(ent,"Disable") doesn't do anything and doesn't error.

Help? I checked and it's finding the integer ent fine (like 54)...
Vincenator is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 08-07-2009 , 01:34   Re: [TF2] Disabling a Control Point
Reply With Quote #12

try
team_control_point_master
team_control_point_round
and maybe the Kill input
__________________
My Pluggies If you like, consider to me.

Last edited by BrutalGoerge; 08-07-2009 at 01:45.
BrutalGoerge is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 08-07-2009 , 01:35   Re: [TF2] Disabling a Control Point
Reply With Quote #13

Also, try the Kill input.
pheadxdll is offline
Vincenator
Member
Join Date: Aug 2009
Old 08-07-2009 , 01:57   Re: [TF2] Disabling a Control Point
Reply With Quote #14

Code:
   new ent = -1
   while ((ent = FindEntityByClassname(ent, "team_control_point")) != -1)
   {
        AcceptEntityInput(ent,"Kill")
   }
That crashes as well...

Nothing happens when I use team_control_point_master or team_control_point round. I'm pretty sure that's because those entities don't exist on arena maps - I've made an arena map (and have a decompiled version of lumberyard) and it uses just team_control_point.

Bah... More help?
Vincenator is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 08-07-2009 , 02:05   Re: [TF2] Disabling a Control Point
Reply With Quote #15

ban anyone who stands on the cp

jk

if those things aren't working, i duno

i think other scripts have disabled the cp, might take a lookie at those and see what they did... assuming they exist
__________________
My Pluggies If you like, consider to me.
BrutalGoerge is offline
Vincenator
Member
Join Date: Aug 2009
Old 08-07-2009 , 02:07   Re: [TF2] Disabling a Control Point
Reply With Quote #16

Now what would that be in SP syntax?

BanAnyone("stands",cp); ???

PROGRAMMING IS HARD!

(But caps lock is not.)
Vincenator is offline
BrutalGoerge
AlliedModders Donor
Join Date: Jul 2007
Old 08-07-2009 , 02:43   Re: [TF2] Disabling a Control Point
Reply With Quote #17

get the location of the point, and anyone within x units of the point = bant
__________________
My Pluggies If you like, consider to me.
BrutalGoerge is offline
Vincenator
Member
Join Date: Aug 2009
Old 08-07-2009 , 02:52   Re: [TF2] Disabling a Control Point
Reply With Quote #18

Lol...

I finally got it to work, courtesy of the Hunted mod by msleeper.

http://forums.alliedmods.net/showthr...=control+point

Code:
    new i = -1;
    new CP = 0;

    for (new n = 0; n <= 16; n++)
    {
        CP = FindEntityByClassname(i, "trigger_capture_area");
        if (IsValidEntity(CP))
        {
            AcceptEntityInput(CP, "Disable");
            i = CP;
        }
        else
            break;
    }
Vincenator 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:32.


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