RE: Scripting/Variables problem.
I'm not sure I get exactly what you are trying to do, but...
void Callback2(string &in asEntity, int alState)
{
AddLocalVarInt("Variable", 1);
if (GetLocalVarInt("Variable") == 0)
{
AddEntityCollideCallback("Player", "Area_3", "MoveWeepingAngel1", true, 0);
AddEntityCollideCallback("Player", "Area_4", "MoveWeepingAngel2", true, 0);
AddEntityCollideCallback("Player", "Area_5", "MoveWeepingAngel3", true, 0);
AddEntityCollideCallback("Player", "Area_6", "MoveWeepingAngel4", true, 0);
}
}
That 'if' will never evaluate to true (unless 'Variable' is initialised to a minus number), because you are adding 1 before it checks if it is 0, which clearly it is not. That means those 4 collide callbacks are not getting added, which may or may not prevent everything from working...
|