Hey!
I have 2 problems.
_____________________________________________________________________
First:
So, my problem is that i have a scare where entities show up all sudden, but the entities are active at all times before even triggering the script. I have set all the entities unactive from Level Editor and also tried to set then unactive with script... But they won't go unactive at all.
Script:
void OnStart()
{
AddEntityCollideCallback("Player", "candlestick_redarea", "redscare", true, 1);
SetLocalVarInt("redfurni", 0);
}
void CheckRedFurni()
{
if(GetLocalVarInt("redfurni") == 1)
{
SetEntityActive("redfurniture_1", true);
SetEntityActive("redfurniture_2", true);
SetEntityActive("redfurniture_3", true);
SetEntityActive("redfurniture_4", true);
SetEntityActive("redfurniture_5", true);
SetEntityActive("redfurniture_6", true);
SetEntityActive("redfurniture_7", true);
SetEntityActive("redfurniture_8", true);
SetEntityActive("redfurniture_9", true);
SetEntityActive("redfurniture_10", true);
SetEntityActive("redfurniture_11", true);
SetEntityActive("redfurniture_12", true);
SetEntityActive("redfurniture_13", true);
}
else
{
SetEntityActive("redfurniture_1", false);
SetEntityActive("redfurniture_2", false);
SetEntityActive("redfurniture_3", false);
SetEntityActive("redfurniture_4", false);
SetEntityActive("redfurniture_5", false);
SetEntityActive("redfurniture_6", false);
SetEntityActive("redfurniture_7", false);
SetEntityActive("redfurniture_8", false);
SetEntityActive("redfurniture_9", false);
SetEntityActive("redfurniture_10", false);
SetEntityActive("redfurniture_11", false);
SetEntityActive("redfurniture_12", false);
SetEntityActive("redfurniture_13", false);
}
}
void redscare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("candlestick_redred_*", false);
SetEntityActive("candlestick_red_*", true);
PlaySoundAtEntity("", "15_the_big_scream.snt", "Player", 0, false);
SetEntityActive("redfurniture_*", true);
AddDebugMessage("Lights on", false);
AddLocalVarInt("redfurni", 1);
}
______________________________________________________________________________________________
Second problem:
Is that, the red light (also shown in the picture above) goes trough wall and floor to the other rooms.. Also some candle lights go trough walls and i want to block this from happening. Can anything be done to this?