Hps file doesn't work
Hi
When i'm entering the map the game doesn't crash but he doesn't respond to the script.
What I've done wrong?
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area_1", "Waterlurker", true, 9);
AddEntityCollideCallback("Player", "ScriptArea_1", "Waterlurker_2", true, 9);
AddEntityCollideCallback("Player", "ScriptArea_2", "Waterlurker_3", true, 9);
AddUseItemCallback("", "Hammer", "Gate", "Kaputt", true);
SetEntityConnectionStateChangeCallback("Lever", "hochfahr");
AddEntityCollideCallback("Player", "Levelchanger", "teleport", true, 1);
}
void Waterlurker(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_1", true);
}
void Waterlurker_2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_2", true);
SetEntityActive("waterlurker_1", false);
}
void Waterlurker_3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_3", true);
SetEntityActive("waterlurker_2", false);
}
void Kaputt(string &in asItem, string &in asEntity)
{
SetEntityActive("Kaputt", true);
SetEntityActive("Gate", false);
SetEntityActive("Box", false);
PlaySoundAtEntity("", "break_wood_metal_3.snt", "Player", 0, false);
}
void hochfahr(string &in asEntity, int alState)
{
if (alState == 1)
{
SetEntityActive("Gate_2", false);
SetEntityActive("Opened", true);
SetEntityActive("Box_2", false);
return;
}
}
void teleport(string &in asParent, string &in asChild, int alState)
{
ChangeMap("Gang.map", "PlayerStartArea_1", "", "");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
|