Burae Posted December 2, 2019 Share Posted December 2, 2019 (edited) My edit of Abigail loses it's allegiance when I go into a cave. It stays above ground and when i come back up I can treat it like any other creature and it won't follow me at this point. Does anyone have a way to get it to die if it loses its alliance, so it drops as a flower again? Or alternatively to reestablish it's alliance when that player comes back up, but that may be too complicated. Edited December 12, 2019 by Burae Link to comment Share on other sites More sharing options...
Ultroman Posted December 8, 2019 Share Posted December 8, 2019 (edited) It depends which state Abigail is in when you come back. With the way the game works, she was probably just saved as any other entity and loaded like any other entity. So I guess what you need, is for Abigail to remember who her master is (save player ID in OnSave), and when she is loaded in, her data then contains the ID of the player, so you in her OnLoad function can start a periodic task where she attempts to reestablish her alliance with any players in her vicinity, checking them for whether they have the right ID. Let me know if that goes way over your head. I think I can write it up pretty fast. Edited December 8, 2019 by Ultroman Link to comment Share on other sites More sharing options...
Burae Posted December 10, 2019 Author Share Posted December 10, 2019 Thank you for your suggestion! I'm not really a coder and I'm doing this just because i thought it would be fun to try so I have no idea how I'd implement that. Could you please show me? Link to comment Share on other sites More sharing options...
Ultroman Posted December 11, 2019 Share Posted December 11, 2019 I think it would be easiest if you could share a zip of your whole mod, so I can test while writing the code. I'll go through what I did after and/or add a bunch of comments. Link to comment Share on other sites More sharing options...
Burae Posted December 12, 2019 Author Share Posted December 12, 2019 Hi! I don't need assistance anymore, since I was just doing a direct edit of the standard character files the code was always there to make this work. The problem was that I didn't change ALL of my references away from "Abigail" to my edit, looking at the "OnSave" like you mentioned caused me to notice I missed a few and i changed them and now the ghost stays allied, and even actually comes into the cave with me now. Problem solved! Link to comment Share on other sites More sharing options...
Ultroman Posted December 14, 2019 Share Posted December 14, 2019 Great job! Investigative programming at its finest Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now