void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "OnPlayerCollide_1", true, 1);
}
void OnPlayerCollide_1(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(3, 5, 1, 0.1);
AddTimer("", 2, "Rock_timer");
}
void Rock_timer(string &in asTimer)
{
SetEntityActive("stone_med01_brown_8", true);
StartPlayerLookAt("stone_med01_brown_8", 10, 10, "");
PlaySoundAtEntity("", "break_stairs", "stone_med01_brown_8", 0, false);
PlaySoundAtEntity("", "react_pant", "Player", 0, false);
}
void OnEnter()
{
}
void OnLeave()
{
}
Why doesn't this work?? I don't get it. Most of it is copied, and with changed names. I tried highlighting the different names, and everything seems to be as it should. But nothing happens when i collide with the script area. I've tried copying the name of the area from the editor to the script. Still no luck.
I get no error... just nothing happens.
EDIT: Ok i now tried to set a message, when you start the level. Nothing happens. Apparently the level and the script aren't working together.
But they have identical names (Except for the .map and .hps)
EDIT2: Okay i don't know what i did, but i deleted the script, made a new one, exactly the same, restarted amnesia, and now it works...
Trying is the first step to success.