The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If statement.
Scupp Offline
Junior Member

Posts: 14
Threads: 5
Joined: Jul 2012
Reputation: 0
#1
If statement.

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.
07-17-2012, 01:43 PM
Find


Messages In This Thread
If statement. - by Scupp - 07-17-2012, 01:43 PM
RE: If statement. - by Juby - 07-17-2012, 02:06 PM
RE: If statement. - by Scupp - 07-17-2012, 02:25 PM



Users browsing this thread: 1 Guest(s)