02-03-2012, 10:33 PM
Hey, I can't make my "prison_section_plain_2" door explode for colliding with an area.
The door is set locked. It's openamount is 0.
If the door cannot be destroyed like this, is there any workaround?
I do not wish to interact with the door directly.
The door is set locked. It's openamount is 0.
Code:
void OnStart()
{
PlayMusic("04_amb.ogg", true, 1, 0.1, 0, true);
SetEntityCallbackFunc("lantern_2", "OnPickup");
AddEntityCollideCallback("Player","ScriptArea_1","DoorExplode",true,1);
}void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("ScriptArea_1", true);
}void DoorExplode(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("prison_section_plain_2", 10, 100, "");
SetPropHealth("prison_section_plain_2", 0.0f);
GiveSanityDamage(10, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
FadeImageTrailTo(3, 1);
FadeSepiaColorTo(5, 1);
FadePlayerFOVMulTo(0.7, 0.05);
AddTimer("timerReset", 1.0f, "TimerResetPlayer");
}void TimerResetPlayer(string &in asTimer)
{
ChangePlayerStateToNormal();
StopPlayerLookAt(); FadeImageTrailTo(0, 1);
FadeSepiaColorTo(0, 1);
//FadeRadialBlurTo(0, 1);
FadePlayerFOVMulTo(1, 0.01f); SetPlayerMoveSpeedMul(1);
SetPlayerRunSpeedMul(1);
SetPlayerLookSpeedMul(1);
}
If the door cannot be destroyed like this, is there any workaround?
I do not wish to interact with the door directly.