icecreamassassin Posted October 31, 2016 Share Posted October 31, 2016 Simple question I hope: How can I have an OnPlayerLoadGame() script event fire a function that is attached to a base weapon form? Basically the script checks to see if one of several scripted weapons are equipped, and if they are it is supposed to fire a function on that weapon's script. I could make it work if I placed references of said weapons in play and linked the script property to it, but currently I do not have it set up where I could easily do that. Is there some way to call a script function attached to a weapon from an OnPlayerLoadGame() event? Thanks. Link to comment Share on other sites More sharing options...
cdcooley Posted November 1, 2016 Share Posted November 1, 2016 If you're using SKSE you can have the weapon's script register for a custom mod event then have OnPlayerLoadGame send that event. That way the weapon itself can detect if it's the one equipped. A messier but workable solution would be to have the OnPlayerLoadGame event check the equipped weapon type then if it's the right thing force the player to drop it to get a proper reference. With the reference you can then add it back to the player's inventory and re-equip it before calling your function. Link to comment Share on other sites More sharing options...
icecreamassassin Posted November 2, 2016 Author Share Posted November 2, 2016 Thanks for the info. Event node stuff is the one area of modding I haven't really delved into at all, but I suppose I'll check that out, thanks a bunch. Link to comment Share on other sites More sharing options...
ReDragon2013 Posted November 2, 2016 Share Posted November 2, 2016 (edited) .. Edited March 6, 2017 by ReDragon2013 Link to comment Share on other sites More sharing options...
icecreamassassin Posted November 2, 2016 Author Share Posted November 2, 2016 Hey awesome, thanks for this. I'll check it out later on tonight and see if I can get it working. Link to comment Share on other sites More sharing options...
Recommended Posts