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
Problem when loading map
Oscar House Offline
Senior Member

Posts: 302
Threads: 3
Joined: Nov 2010
Reputation: 9
#2
RE: Problem when loading map

Here is where your problem is:
Spoiler below!
void OnLeverStateChange(string &in EntityName, int alState)
{
if (alState == 0)
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
}
void OnStart()
{
PlayMusic("01_amb_darkness.ogg, false, 1.0f, 0.5f, 10, false)
}

void SetEntityConnectionStateChangeCallback(leverbooks_01, OnLeverStateChange);
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}

//===========================================
// This runs when the player leaves the map
void OnLeave()
{
StopMusic(0.5f, 1);
}
You shouldn't put it as a function, instead place it inside Onstart(), like this:
Spoiler below!
void OnLeverStateChange(string &in EntityName, int alState)
{
if (alState == 0)
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
}
void OnStart()
{
PlayMusic("01_amb_darkness.ogg", false, 1.0f, 0.5f, 10, false);
SetEntityConnectionStateChangeCallback("leverbooks_01", "OnLeverStateChange");
}

//===========================================
// This runs when the player enters the map
void OnEnter()
{
}

//===========================================
// This runs when the player leaves the map
void OnLeave()
{
StopMusic(0.5f, 1);
}

You also missed some quotation marks and a semicolon from there, I added those as well. See how it works, though I suspect there might still be something I missed.

[Image: 2exldzm.png]
03-02-2011, 05:44 PM
Find


Messages In This Thread
Problem when loading map - by Viperdream - 03-02-2011, 05:34 PM
RE: Problem when loading map - by Oscar House - 03-02-2011, 05:44 PM
RE: Problem when loading map - by Viperdream - 03-02-2011, 06:24 PM
RE: Problem when loading map - by nkmol - 03-02-2011, 09:01 PM
RE: Problem when loading map - by Pandemoneus - 03-02-2011, 09:02 PM
RE: Problem when loading map - by nkmol - 03-02-2011, 09:16 PM
RE: Problem when loading map - by Viperdream - 03-03-2011, 08:33 PM
RE: Problem when loading map - by Nye - 03-04-2011, 01:34 AM
RE: Problem when loading map - by Viperdream - 03-04-2011, 04:35 PM
RE: Problem when loading map - by Pandemoneus - 03-04-2011, 05:15 PM
RE: Problem when loading map - by Viperdream - 03-04-2011, 06:08 PM



Users browsing this thread: 1 Guest(s)