luska233 Posted April 18, 2023 Share Posted April 18, 2023 I'm creating a mod to replace vanilla's wonky summoning limit, and I need for my script to listen to when the summoned creature expires or dies. However, I'm finding excendingly difficult to get the RefId of the summoned creature. The best I could find was to use "GetCommandedActors" from papyrus extender to return the last entry of the array. Using this command, I succesfully attached a spell with a "ondeath" script, but it's failing to fire the event, despite firing the "oneffectstart" event. I tried different events, such as "oneffectend", "ondeath", "ondying" and "onunload", all fail to fire, except "oneffectend" which fires as soon as the effect is applied, for some reason. Any thoughts? Please let me know. Thanks. Link to comment Share on other sites More sharing options...
Sphered Posted April 20, 2023 Share Posted April 20, 2023 There are several Game.Find calls you could use. But that is only reliable if only one ref is present which uses that actorbase Form NPCBaseWeWantToFind ObjectReference SummonedRef = Game.FindClosestReferenceOfTypeFromRef(NPCBaseWeWantToFind,akCaster,2048.0) What might be better, is if you know all the actorbase records you are dealing with, you can attach a script to their actorbase to listen for events. So like OnDying() you can have that actor relay that info then Outside of all of this, for multiple summons you can give yourself a perk. You can duplicate the twin souls perk and give it a higher cap Link to comment Share on other sites More sharing options...
Recommended Posts