02-04-2012, 04:06 PM
void OnStart()
{
AddEntityCollideCallback("Player", "roomevent", "room1", true, 1);
AddEntityCollideCallback("Player", "pianoevent", "pianoscare", true, 1);
}
void room1(string &in asParent, string &in asChild, int alState)
{
SetLampLit("candle1", false, false);
SetLampLit("candle2", false, false);
SetLampLit("candle3", false, false);
SetSwingDoorClosed("doorslam2", true, true);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
}
void pianoscare(string &in asParent, string &in asChild, int alState)
{
SetLeverStuckState("piano", 0, true);
AddPropImpulse("piano", 0, 0, "world");
PlaySoundAtEntity("piano", "break_wood", "piano", false);
CreateParticleSystem("", "pa_dust_impact.pa", "impact", false);
}
void OnLeave()
{
}
Hey This is a script i made which will make the piano slam. But it isn't working it says cannot load script and has a fair few script errors all to do with the strings? Any help would be useful thank you