Jump to content

Triggering explosions from a script


ATOSProductions

Recommended Posts

So I wanted to trigger an explosion from script. Naturally, the first thing I attempted was to use PlayExplosion, however, when attempting to compile, GECK stated that it was a console-only command. Fine, I thought, and attempted to simulate the effect by creating an explosive projectile with timer and proximity set to 0 (all other settings identical to frag mine), then creating a persistent and initially disabled reference of it and enabling it from the script. Didn't work either - no response whatsoever. Now, I am positive that the script I want to use for enabling it is correct, as it works perfectly whenever I try to enable anything else. The instantly exploding projectile by itself works too, as became evident when unchecking the "initially disabled" box - exploded right as my savegame finished loading.

 

So, can anyone tell me what am I doing wrong? I'll gladly take any solution, be it to why PlayExplosion doesn't work, to why can't I enable that projectile, or even some other way of getting the desired effect.

 

Also, if this has already been answered and that answer is reasonably easy to find, feel free to deliver a punch between my eyes. I tried and didn't find a single result describing such a problem.

 

Thank you all in advance,

ATOS out

Link to comment
Share on other sites

You're just thinking too much into it. All you need is a named persistent ref (we'll call it myRef) where you want the explosion. It can be an xmarker, an actor, whatever. Then, the line would be 'myRef.placeatme (explosion's baseID)' Edited by uhmattbravo
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...