Raised This Month: $ Target: $400
 0% 

logic_case


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AnIHiL
Member
Join Date: Sep 2009
Old 10-13-2010 , 11:42   logic_case
Reply With Quote #1

I would like to change output delay in logic_case entity on map.

I checked in Hammer info about this logic_case:
- output: OnCase01
- target: counter_2_teleports
- input: Add
- parameter: 1
- delay: 2.00
- fire only once: no

Now I'm trying to change this delay to 10 seconds. I have now code:
PHP Code:
new limit GetMaxEntities();
new 
start = -1;
new 
entityy = -1;
new 
String:namee[150];
new 
String:addoutput[64];

while (
start limit)
{
    
entityy FindEntityByClassname(start"logic_case");
    
    if (
entityy == -1)
        
start limit;
    else
    {
        
start entityy;
        
        
GetEntPropString(entityyProp_Data"m_iName"nameesizeof(namee));
        
        if (!
strcmp(namee"case_2_teleports"))
        {
            
Format(addoutputsizeof(addoutput), "OnCase01 counter_2_teleports:Add:1:%f:-1"10.0);
            
SetVariantString(addoutput);
            
AcceptEntityInput(entityy"AddOutput");
        }
    }

I thought it would change existing output OnCase01 but I might be wrong. How can I change delay or how to delete output from entity than I may add my own one?

From documentation ( http://developer.valvesoftware.com/wiki/Logic_case ):
Code:
AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care. 
Format: <key> <value> 
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>

Last edited by AnIHiL; 10-13-2010 at 11:45.
AnIHiL is offline
Send a message via MSN to AnIHiL
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-13-2010 , 11:52   Re: logic_case
Reply With Quote #2

Just curious, have you looked into using Stripper: Source for this? Or is it not a possibility with what you want to do?
__________________
thetwistedpanda is offline
AnIHiL
Member
Join Date: Sep 2009
Old 10-13-2010 , 11:57   Re: logic_case
Reply With Quote #3

Never heard about it. Thank you for information. (link: http://www.bailopan.net/stripper/ )
AnIHiL is offline
Send a message via MSN to AnIHiL
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-13-2010 , 12:00   Re: logic_case
Reply With Quote #4

Logic_case is non-networking entity, you'll need it's reference. Haven't worked with them, might be some quirks.
__________________
FaTony is offline
AnIHiL
Member
Join Date: Sep 2009
Old 10-13-2010 , 12:03   Re: logic_case
Reply With Quote #5

So Stripper:Source won't work ?
AnIHiL is offline
Send a message via MSN to AnIHiL
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 10-13-2010 , 12:05   Re: logic_case
Reply With Quote #6

No Stripper:Source will, you'll just need to do whatever you need to before the map loads (when Stripper does it's thing). If you need to modify it later, then you'll need what FaTony suggested.
__________________

Last edited by thetwistedpanda; 10-13-2010 at 12:51.
thetwistedpanda is offline
AnIHiL
Member
Join Date: Sep 2009
Old 10-13-2010 , 12:09   Re: logic_case
Reply With Quote #7

I want to set delay only once. Don't need to change it again in game so Stripper:Source should be fine to do this.
AnIHiL is offline
Send a message via MSN to AnIHiL
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:46.


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