Frictional Games Forum (read-only)

Full Version: Multiple "if" statement
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I scoured the wiki but I still can't find the tutorial on "if" statements, so I'll just ask it here:

How do I get a script to activate only when multiple "if's" are satisfied? I want to trigger a function, for example, when a certain variable is at 1 and when two entities are inside certain script areas.
well the way I know is you use something like this:

if(GetLocalVarInt(jfjeb) == 1 && GetLocalVarInt(hello) == 1)
{

}
Worked like a charm. Thanks man!
You're welcome Smile