(03-24-2013, 08:51 PM)Knusper. Wrote: There i have a question:
Slender_1active = (alState == 1);
Does that mean that Slender_1active = true or false?
Or is that completely wrong?
It might be completely wrong
void Slender1 (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Slender_1", true);
Slender_1active = true;
}
You are setting Slender_1 to active, so you should set Slender_1active to true, it doesn't matter whether the player is entering or leaving the area, since SetEntityActive("Slender_1", true); is being used regardless of whether the player is entering or leaving. The collide callback is set to only execute when the player is entering the area anyway
I'm not sure you can assign a boolean value using (alState==1), so try it as in my code above. If that doesn't work then maybe there's another problem, if mine does work, then its likely that you can't assign the value the way you were trying