(03-17-2012, 09:22 PM)ClayPigeon Wrote: You can play with areas and sounds:
void OnStart()
{ AddEntityCollideCallback("SCRIPT_AREA", "ITEM_TO_EXPLODE", "function_explode", true, 1);
}
void function_explode(string &in asChild, string &in asParent, int alState)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
SetPropHealth("ITEM_TO_EXPLODE", 0.0f);
StartScreenShake(1.0f, 2.0f, 1.0f, 2.0f);
}
With this script though it would also destroy the item if you just carry it into the script area, which I would like to avoid. I also suppose there's no way to create an explosion no matter what you throw the object against? Creating particle systems and sounds depend largely on stationary script areas, but if you guys know of any way I can make the explosion happen anywhere, I'd love the advice.