Hi im new here in this forum and im pretty new to the this custom story editor and I think this is pretty funny, but i got this scripting problem that has been bothering me for a while.. I am trying to make a grunt appear when I pick up a certian key and make the kety fit into a door like they do in this tutorial:
http://wiki.frictionalgames.com/hpl2/tut...[]=monster
I have followed and read the whole page a couple of times now and I still got problems..(There may be something I have missed. Im good at missing stuff I read)
This is the error I get:
FATAL ERROR: Could not load script file `MyMaps/Firstmap.hps`!
Main(7,3): ERR A function with the same name and parameters already exist.
Main(12,1): ERR A function with the same name and parameters already exist.
Main(23,3): ERR A function with the same name and parameters already exist.
Main(28,3): ERR A function with the same name and parameters already exist.
Main(14,3): ERR No matching signatures to `AddUseItemCallback(string@&,string@&,string@&, const bool)`
I know those first Errors seems kind of obvious but I have tried to do something about it by deleting some void OnStart just to check if that worked, but sadly it didnt.
Here is my script if you are considering to help
////////////////////////////
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "corridorkey_1", "keydoor_1", "UsedKeyOnDoor", true);
}
void OnStart()
{
AddUseItemCallback("", "corridorkey_1", "keydoor_1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("corridorkey_1", "OnPickup");
}
void OnStart()
{
AddUseItemCallback("corridorkey_1", "keydoor_1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("corridorkey_1", "OnPickup");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("keydoor_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "keydoor_1", 0, false);
RemoveItem("corridorkey_1");
}
void OnStart()
{
AddUseItemCallback("", "corridorkey_1", "keydoor_1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("corridorkey_1", "OnPickup");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("keydoor_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "keydoor_1", 0, false);
RemoveItem("corridorkey_1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("gruntyboy_1", true);
ShowEnemyPlayerPosition("gruntybot1");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Thx anyway