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
Nublette Requires Assistance with Scripting and Puzzles
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#2
RE: Unable to interact with entity in script area

Are you able to interact with the box before it moves into the area for the first time? Which entity is SafeBox_0?

Also, this code should work for stopping the music when SafeBox_0 leaves Area_Safe:

PHP Code: (Select All)
void OnStart()
{    
    
AddEntityCollideCallback("SafeBox_0""Area_Safe""Script_Safe"false1);
    
AddEntityCollideCallback("SafeBox_0""Area_Safe""Script_Safe"false, -1);
}

void Intro ()
{

}

void OnEnter ()
{

}

void Script_Safe (string &in asParentstring&in asChildint alState)
{    
    if(
alState == 1) {
        
PlayMusic("09_amb_safe"true167false);
    }
    else if(
alState == -1) {
        
StopMusic(37);    
    }


In Ruins [WIP]
(This post was last modified: 01-04-2013, 08:49 AM by NaxEla.)
01-04-2013, 08:43 AM
Find


Messages In This Thread
RE: Unable to interact with entity in script area - by NaxEla - 01-04-2013, 08:43 AM



Users browsing this thread: 2 Guest(s)