(07-12-2012, 01:17 AM)Your Computer Wrote: (07-12-2012, 12:14 AM)HoyChampoy Wrote: For the string asName do I put the name of the ladder or the name of the valve?
Name of the valve.
(07-12-2012, 12:14 AM)HoyChampoy Wrote: and lets say for the asCallback, if i named it activateladderarea, would i put SetEntityActive in there?
Yes.
(07-12-2012, 12:14 AM)HoyChampoy Wrote: like this:
You need to make use of alState if you want to make the ladder area active only when the valve is fully turned towards a certain direction.
Got it to work
SetEntityConnectionStateChangeCallback("valve_iron_rusty_1", "ladderarea");
void activateladderarea(string &in asEntity, int alState)
{
SetMultiSliderCallback("valve_iron_rusty_1", "ladderarea");
}
void ladderarea(string &in asEntity, int alState)
{
if(alState == 1)
{
SetEntityActive("LadderArea_1", true);
}
}