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(entityy, Prop_Data, "m_iName", namee, sizeof(namee));
if (!strcmp(namee, "case_2_teleports"))
{
Format(addoutput, sizeof(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>