theclawhorn Posted February 3, 2015 Share Posted February 3, 2015 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 More sharing options...
weijiesen Posted February 3, 2015 Share Posted February 3, 2015 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 More sharing options...
theclawhorn Posted February 3, 2015 Author Share Posted February 3, 2015 (edited) 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 February 3, 2015 by Deathfang Link to comment Share on other sites More sharing options...
theclawhorn Posted February 3, 2015 Author Share Posted February 3, 2015 Yeah, the above method I mentioned--searching for explosion refs--works well enough. I knew it was possible to do such a thing before asking this question but I was curious if there was an easier/faster and more direct way to acquire the reference. Link to comment Share on other sites More sharing options...
theclawhorn Posted February 3, 2015 Author Share Posted February 3, 2015 (edited) 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 February 3, 2015 by Deathfang Link to comment Share on other sites More sharing options...
Recommended Posts