Hello again,
I've set it so that when the Player collides with an Area, it slams open the door and a monster runs past the door. However my Player fails to collide at all with the area and I cannot work out why.
The script for the level is below.
//=========================
void OnStart()
{
SetPlayerActive(true);
FadeOut(0);
AddEntityCollideCallback("Player", "doorswingopen", "Door_Swing", true, 0);
AddTimer("FadeBack", 3.5f, "Fade_Back");
FadeIn(2);
PlayMusic("asylum_main", true, 0.5f, 2.0f, 0, true);
}
void Door_Swing(string &in asParent, string &in asChild, string &in alState)
{
AddDebugMessage("Music stops and door opens suddenly, monster runs past.", true);
StopMusic(1.5f, 0);
AddTimer("InfectedSpawn", 2.5f, "Infected_Spawn");
{
if(GetSwingDoorClosed("prisondoor_open") == true)
AddTimer("prisondoor_open", 0.2f, "TimerCreakDoor");
}
}
void TimerCreakDoor(string &in asTimer)
{
AddPropForce("prisondoor_open", 0, 0, 5, "World");
}
void Infected_Spawn(string &in asTimer)
{
AddDebugMessage("monster spawns and runs past, disappears shortly after", true);
SetEntityActive("Infected1", true);
AddEnemyPatrolNode("Infected1", "infected_patrol_1", 0.0f, "character_infected_run.anm");
AddEnemyPatrolNode("Infected1", "infected_patrol_2", 1.5f, "character_infected_run.anm");
FadeEnemyToSmoke("Infected1", true);
ClearEnemyPatrolNodes("Infected1");
}
//=========================
void OnEnter()
{
}
//=========================
void OnLeave()
{
}
If anyone could help me out I would really appreciate it
.