02-11-2012, 06:54 AM
Here is my code:
Long story short, it doesn't work. Every entity is named correctly. Basically, this is making it so that when the storage box enters the area of "Throw2", it triggers the script. It doesn't work.
Code:
void OnStart()
{
AddEntityCollideCallback("storage_box_1", "Throw2", "Barricade", true, 1);
PlayMusic("02_amb_strange.ogg", true, 1, 0, 5, true);
}
void Barricade(string &in asParent, string &in asChild, int alState)
{
AddPropForce("barrel01_1", 0, 2, 10, "World");
AddPropForce("barrel01_2", 0, 2, 10, "World");
AddPropForce("barrel01_3", 0, 2, 10, "World");
AddPropForce("storage_box_wood02_moveable", 0, 2, 10, "World");
AddPlayerSanity(25);
PlaySoundAtEntity("DaughterRelief.ogg", "DaughterRelief.snt", "Player", 0, false);
}
Long story short, it doesn't work. Every entity is named correctly. Basically, this is making it so that when the storage box enters the area of "Throw2", it triggers the script. It doesn't work.