Jump to content

Referencing explosion with object effect from affected actor?


theclawhorn

Recommended Posts

When, for example, you have an object effect on an explosion and it is applied to actors who come into contact with it, using GetSelf in the script will return a reference to the affected actor. Is it possible to get a reference to the explosion that applied the effect to the actor?

Link to comment
Share on other sites

Haven't tried... but... if you were to instead use an Container (or Activator) , with Destruction Data (Damage Stages) on it, and a script attached to it so that the moment it comes into existence, it damage ITSELF (thus *causing an explosion* via it's own Destruction Data), then maybe!!! (haven't tried tho) (possibly using something like... ref Self, : Set Self to GetSelf)

http://geck.bethsoft.com/index.php?title=GetSelf

 

again, not tried though, so who knows.

this may help too : http://geck.bethsoft.com/index.php?title=GetCauseofDeath

Link to comment
Share on other sites

Even if I used such a method I'm not sure if I would be able to achieve what I want. I need a reference to the explosion that owns the object effect once it has been applied to an actor so I can do some calculations based on explosion type, angle, and distance within the script itself. I think I'll have to use a search method with FOSE, using GetFirstRef and GetNextRef only searching for explosions.

Edited by Deathfang
Link to comment
Share on other sites

Well I've done some more testing and the results are a bit sketchy, at least in my eyes. About 60% of the time it will find the explosion and act accordingly, I have an else clause in my script in case it is unable to find the explosion. I'd like at least a 95% success rate if not 100%. I have no idea why it is acting so weird. Why would it sometimes find an explosion and other times not if an explosion happens every single time? I even tried inserting the search 3 different times just to make sure the explosion is found. The entire script takes place inside of a ScriptEffectStart block.

Edited by Deathfang
Link to comment
Share on other sites

  • Recently Browsing   0 members

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