Frictional Games Forum (read-only)
Multiple "if" statement - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Multiple "if" statement (/thread-14326.html)



Multiple "if" statement - Damascus - 03-29-2012

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.



RE: Multiple "if" statement - SilentStriker - 03-29-2012

well the way I know is you use something like this:

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

}


RE: Multiple "if" statement - Damascus - 03-30-2012

Worked like a charm. Thanks man!



RE: Multiple "if" statement - SilentStriker - 03-30-2012

You're welcome Smile