(08-05-2012, 04:52 AM)ExenderVes Wrote: Have you got the
void OnEnter(){ }
void OnLeave(){ }
after those things? It should look like this if it does:
Quote:////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "keydoor", "mansion_1", "OuvrirPorte", true;
}
void OuvrirPorte(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", unlock_door", "mansion_1", 0, false);
RemoveItem("keydoor");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
And i think you missed a ")" after what i marked in red
Hope it works
I copied this in my file, but I still get the error. I tried to copy the on from the frictional games site (
http://wiki.frictionalgames.com/hpl2/tut...t_beginner), and this one works.
Ok, so I know I can enter my map. But my key dosen't open the door.
////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "keydoor", "mansion_1", "OuvrirPorte", true;
}
void OuvrirPorte(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", unlock_door", "mansion_1", 0, false);
RemoveItem("keydoor");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}