04-09-2011, 07:58 AM
What's wrong with this code? I have the key but it doesn't trigger the event.
The code still won't get triggered if I have that key. What's wrong with it?
Code:
void CollideAreaLiving(string &in asParent, string &in asChild, int alState)
{
if(HasItem("key_storage") == true){
//Slime Fades
SetPropActiveAndFade("slime_6way_1", true, 1.5f);
SetPropActiveAndFade("slime_anim_wall_1", true, 1.5f);
SetPropActiveAndFade("slime_pile_1", true, 1.5f);
SetPropActiveAndFade("slime_pile_2", true, 1.5f);
//Effects
StartScreenShake(0.115, 2.0f, 0.1f,0.3f);
FadeSepiaColorTo(100.0f, 4.0f);
FadeRadialBlurTo(0.15f, 6.0f);
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
//Timer to remove effects
AddTimer("FadeGone", 3.0f, "GuardianTimer");
}
}
The code still won't get triggered if I have that key. What's wrong with it?