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
Level Editor Help Entities won't go unactive and light
Ermu Offline
Member

Posts: 86
Threads: 13
Joined: Jan 2012
Reputation: 2
#1
Entities won't go unactive and light

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.

[Image: 1zezibb.jpg]

[Image: rmljc8.jpg]


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?
02-27-2012, 02:31 PM
Find


Messages In This Thread
Entities won't go unactive and light - by Ermu - 02-27-2012, 02:31 PM



Users browsing this thread: 1 Guest(s)