Amnesia script help
So im doing this scare when rocks are falling down at you and a sounds playing at the same time. The problem is that the map thats but then when it comes to it the script dosent activate.
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Awesome_key", "Awesome_door", "ABC", true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "korridor", "bana", true, 1);
AddUseItemCallback("", "secret_key", "secret_door", "SECRET", true);
AddEntityCollideCallback("Player", "servant_grunt_1", "MonsterAway", true, 1);
AddEntityCollideCallback("Player", "falldown", "falldown", true, 1);
PlayMusic("creepy.ogg", false, 0.6, 5, 0.5, true);
AddEntityCollideCallback("Player", "checkpoint_1", "Restart", true, 1);
}
//INFO******************************
//PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
//INFO******************************
void Restart(string &in asParent, string &in asChild, int alState)
{
CheckPoint ("FirstCheckpoint", "checkpoint_1_spawn", "Happening", "DeathCategory", "Deathtext");
}
void falldown(string &in asItem, string &in asEntity)
{
SetEntityActive("rock_med02_push_1", true);
SetEntityActive("rock_med02_push_2", true);
SetEntityActive("rock_med02_push_3", true);
SetEntityActive("rock_med02_push_4", true);
SetEntityActive("rock_med02_push_5", true);
SetEntityActive("rock_med02_push_6", true);
SetEntityActive("rock_med02_push_7", true);
SetEntityActive("rock_med02_push_8", true);
void PreloadSound(string& scare_falldown.ogg);
}
void ABC(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked( "Awesome_door", false, true);
PlaySoundAtEntity("", "unlock_door", "Awesome_door", 0, false);
RemoveItem("Awesome_key");
}
void SECRET(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked( "secret_door", false, true);
PlaySoundAtEntity("", "unlock_door", "secret_door", 0, false);
RemoveItem("secret_key");
}
void bana(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("osynlig", true);
SetEntityActive("synlig", false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
|