Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Scripting/Variables problem.
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#3
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...

02-05-2013, 10:52 AM
Find


Messages In This Thread



Users browsing this thread: 3 Guest(s)