bwins95 Posted March 8, 2013 Share Posted March 8, 2013 I'm trying to add and remove spells with mcm.it's the next step for my follower recall mod, but I can't get it to work. I've managed to make this and it compiles successfully, but it doesn't work. I've spent all day on this. can somene tell me what I'm doing wrong or point me to a tutorial. I've red through the tutorials on github several times. Scriptname MyConfigmenu extends SKI_ConfigBase; OIDint toggleOID_B ; _B for toggleSpell property aaaaa2 Auto; Statebool toggleState = falseevent OnPageReset(string page) toggleOID_B = AddToggleOption("My Checkbox", toggleState)endEventevent OnOptionSelect(int option) if (option == toggleOID_B) toggleState = !toggleState SetToggleOptionValue(toggleOID_B, toggleState) if (toggleState == True) Game.GetPlayer().AddSpell(aaaaa2) elseif (toggleState == False) Game.GetPlayer().RemoveSpell(aaaaa2) endif endIfendEvent Link to comment Share on other sites More sharing options...
unuroboros Posted March 9, 2013 Share Posted March 9, 2013 The first thing I'd do is add some simple "break points" at your AddSpell and RemoveSpell lines. Like so: if (toggleState) Debug.Notification("Adding spell: " + aaaaa2) Game.GetPlayer().AddSpell(aaaaa2) else Debug.Notification("Removing spell: " + aaaaa2) Game.GetPlayer().RemoveSpell(aaaaa2) endif Also, did you add the PlayerAlias with SKI_PlayerLoadGameAlias? Link to comment Share on other sites More sharing options...
bwins95 Posted March 9, 2013 Author Share Posted March 9, 2013 (edited) unuroboros, on 08 Mar 2013 - 18:48, said:The first thing I'd do is add some simple "break points" at your AddSpell and RemoveSpell lines. Like so: if (toggleState) Debug.Notification("Adding spell: " + aaaaa2) Game.GetPlayer().AddSpell(aaaaa2) else Debug.Notification("Removing spell: " + aaaaa2) Game.GetPlayer().RemoveSpell(aaaaa2) endif Also, did you add the PlayerAlias with SKI_PlayerLoadGameAlias?Thanks for the response. Yes, I"ve got the alias. I've added those lines and I get "adding spell: none" in game. Edited March 9, 2013 by bwins95 Link to comment Share on other sites More sharing options...
FiftyTifty Posted March 9, 2013 Share Posted March 9, 2013 Sounds like a properties issue. Link to comment Share on other sites More sharing options...
bwins95 Posted March 9, 2013 Author Share Posted March 9, 2013 (edited) I've got the messages working by moving hte property above the oid. adding spells still doesn't work. Edited March 10, 2013 by bwins95 Link to comment Share on other sites More sharing options...
Recommended Posts