07-02-2013, 12:36 PM
I was making a final script for a level of mine, where you have to hit a wall with a sledge to destroy it, so you can go to the other side. However, when I hit the area with the sledge, nothing happens.
The curious thing is that if I try exactly the same script with the exact names in another map, it works...
Any clue of this?
Code:
void OnStart()
{
AddEntityCollideCallback("Sledge_1", "Area_use_sledge", "Destroywall", true, 1);
}
void Destroywall (string &in asParent, string &in asChild, int alState)
{
SetEntityActive("cracks_brown_1", false);
SetEntityActive("cellarbase_wall_cracked_2", false);
SetEntityActive("cellarbase_wall_cracked_1", false);
SetEntityActive("cellarbase_wall_destroyable_1", true);
CreateParticleSystemAtEntity("Particle_dust", "ps_dust_break_25.ps", "Area_use_sledge", false);
PlaySoundAtEntity("Destroydawall", "explosion_rock_large.snt", "Player", 0.1, false);
}
The curious thing is that if I try exactly the same script with the exact names in another map, it works...
Any clue of this?