ClayPigeon
Member
Posts: 214
Threads: 13
Joined: Mar 2012
Reputation:
8
|
RE: Throw an exploding object?
(03-17-2012, 09:36 PM)Damascus Wrote: (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. I thought the idea is that the object that is carried will be exploded after entering an area, so I assumed it needs to be destroyed after exploding...
Anyway I am clueless about the explosion effect itself... I am weak with particle systems.
|
|
03-17-2012, 09:39 PM |
|