01-08-2012, 04:28 AM
I've been scripting for a while, and have no idea whats wrong. Am I a making a simple mistake here, and just over looking it because I am tired, or is there something wrong here? Here is my code, all areas, are named correctly.
Code:
void OnEnter ()
{
AddEntityCollideCallback("Player", "DoorsScare", "HallwayScare", true, 1);
}
void HallwayScare(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "DoorEffect1", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "DoorEffect1", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "DoorEffect5", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "DoorEffect5", false);
AddTimer("", 1, "Doors2");
}
void Doors2(string &in asTimer)
{
PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "DoorEffect2", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "DoorEffect2", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "DoorEffect6", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "DoorEffect6", false);
AddTimer("", 1, "Doors3");
}
void Doors3(string &in asTimer)
{
PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "DoorEffect3", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "DoorEffect3", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "DoorEffect7", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "DoorEffect7", false);
}
void OnLeave ()
{
}