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

Arena Control Point manipulation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vincenator
Member
Join Date: Aug 2009
Old 08-09-2010 , 13:49   Arena Control Point manipulation
Reply With Quote #1

I'm trying to effectively change the time at which the control point on arena maps is enabled from the default 60 seconds to my own event that I run later. I've gotten it to "work", but I'm having trouble with the "aesthetics".

What currently happens:
Round start: HUD icon has a lock, no floating symbol above the CP.
55 seconds into the round: Announcer counts down from 5 and says "CP Enabled", the HUD icon counts down from 5 and then no longer has a lock, and the floating symbol is a question mark.
Some time later (when I choose): Same as immediately before, but standing on the Control Point captures it as it should (and then changes the floating icon accordingly).

What I'd like to happen is:
Round start: Same as currently
55 seconds into the round: No change from round start
Some time later (when I choose): Count down from 5, remove the lock icon, and make the floating symbol a question mark (exactly what happens 55 seconds into the round currently).

My code:
PHP Code:
//On arena round start
    
new startEnt = -1;
    new 
CP 0;//team_control_point is the spinny icon
    
CP FindEntityByClassname(startEnt"trigger_capture_area");
    if (
IsValidEntity(CP)){
        
AcceptEntityInput(CP"Disable")
    }

...

//When I want
    
new startEnt = -1;
    new 
CP 0;//team_control_point is the spinny icon
    
CP FindEntityByClassname(startEnt"trigger_capture_area");
    if (
IsValidEntity(CP)){
        
AcceptEntityInput(CP"Enable")
    } 
I disable/enable the trigger_capture_area.

If I could just block the "Control Point Enabled" event that happens at 55/60 seconds (if there is one?), that would probably do the trick.

I've found out that I can do HideModel on the team_control_point to remove the spinny question-mark icon above the control point, but the map un-hides it at 60 seconds. It seems I can use DispatchKeyValue to change some properties of the C, but can I set its flags? I'd like to set flag 1 on team_control_point to get rid of the HUD, if possible..

P.S. I asked a similar question (to which this is a follow-up) a while ago here.

Sorry for poorly-written long-post, and thanks! ;)

Last edited by Vincenator; 08-09-2010 at 19:08.
Vincenator is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 08-09-2010 , 16:54   Re: Arena Control Point manipulation
Reply With Quote #2

doesn't it work by just setting area_time_to_cap on
Trigger_capture_area?
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
Vincenator
Member
Join Date: Aug 2009
Old 08-09-2010 , 19:03   Re: Arena Control Point manipulation
Reply With Quote #3

I have yet to test that, but it seems like it's how long it takes to capture the control point (presumably with 1 non-scout standing on it), not how long until it is enabled. Thanks, though.

EDIT: I completely forgot (from mapping) about tf_logic_arena. It has a property called CapEnableDelay, so one could guess what it does. I'll update this once I test, but I think I have my answer.

EDIT 2: I've been trying to DispatchKeyValue(arenaLogic,"CapEnableDelay", "15"), but it hasn't worked. I get no errors, and the DispatchKeyValue function returns true, but the CP still takes 60 seconds.. :/
PHP Code:
new startEnt= -1;
new 
arenaLogic FindEntityByClassname(startEnt"tf_logic_arena");
DispatchKeyValue(arenaLogic,"CapEnableDelay","15"

Last edited by Vincenator; 08-09-2010 at 20:12.
Vincenator is offline
Vincenator
Member
Join Date: Aug 2009
Old 08-09-2010 , 21:58   Re: Arena Control Point manipulation
Reply With Quote #4

You can't change the key values of an existing entity, like the tf_logic_arena entity? Darnit, that would have made everything so much easier.

Now I'm trying to find out how to block the event that starts the countdown. The only clue I've got so far is "OnArenaRoundStart", but I don't understand if I can block it..

I have not gotten anything to happen with either "OnCapEnabled(){..}" or the event "controlpoint_initialized". I *thought* that blocking the controlpoint_initialized event would fix my problems, but I can't even find that event as firing at all, so blocking it's obviously out of the question.


Help blocking the announcer countdown, hud icon changing from locked to normal, and hud icon counting down please?

Last edited by Vincenator; 08-09-2010 at 22:22.
Vincenator is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 08-10-2010 , 02:00   Re: Arena Control Point manipulation
Reply With Quote #5

use stripper source to modify the entity.
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
Vincenator
Member
Join Date: Aug 2009
Old 08-10-2010 , 18:07   Re: Arena Control Point manipulation
Reply With Quote #6

Thanks for the link, but unless the stripper can modify keyvalues during the round, I don't think it will suit my needs. All I need now is to find a way to shut up the announcer at the one-minute mark.. Hm.
Vincenator is offline
Monkeys
Veteran Member
Join Date: Jan 2010
Old 08-10-2010 , 18:13   Re: Arena Control Point manipulation
Reply With Quote #7

StopSound ?
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys 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 12:55.


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