I need little help with this if statement. How can I make it so that IF some entities in the script are active, something happes. I readed this:
http://wiki.frictionalgames.com/hpl2/tut...ner#the_if and have watched some videos but I can't find the answer or any other way to do this.
Let's say that I have this script:
void lauta(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlayMusic("impact_wood_low2.ogg", false, 150.00, 0, 0, true);
SetEntityActive("lauta_1", true);
SetEntityActive("lauta", false);
}
}
void lauta2(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlayMusic("impact_wood_heavy_low2.ogg", false, 150.00, 0, 0, true);
SetEntityActive("lauta_2", true);
SetEntityActive("lauta2", false);
}
}
void lauta3(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlayMusic("impact_wood_heavy_low2.ogg", false, 150.00, 0, 0, true);
SetEntityActive("lauta_3", true);
SetEntityActive("lauta3", false);
}
}
I wan't that something happens when lauta_1, lauta_2 and lauta_3 are active. How can I do that? I'm not here to get whole script. I just want to know how it happens and what should I do.