MilletGtR Posted March 11, 2014 Share Posted March 11, 2014 Hi fellow nexus forumers! You could say I'm a newcomer to scripting, so I would like to hear some of you more advanced scripters to tell me why a part of my script is not triggering: Scriptname Test extends QuestEvent OnInit() Debug.Notification("Initiated.")EndEventEvent OnStoryIncreaseLevel(int aiNewLevel) Debug.Notification("Level up.") Stop()EndEventThe bolded part is what is not working currently. I get the "Initiated." notification in game when I start the mod for the first time, which means the quest setup and script is working. The intended use of this script is for something to happen when the player levels up, but the notification never displays. The quest which is tied to the script has the Event Node: Increased Level (what makes the quest trigger), and Run Once unchecked. Am I missing something, or using the OnStoryIncreaseLevel wrong? Any help is appreciated. Kind regardsMilletGtR Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 11, 2014 Share Posted March 11, 2014 Double check that the notification is not getting block by the skills menu. Add a Debug.Trace line and check the papyrus log. Link to comment Share on other sites More sharing options...
MilletGtR Posted March 11, 2014 Author Share Posted March 11, 2014 (edited) Double check that the notification is not getting block by the skills menu. Add a Debug.Trace line and check the papyrus log.I just added Debug.Trace ("Initiated trace") to Event OnInit, this showed up in the papyrus.0.log, however, I also added Debug.Trace ("It works!") to the Event OnStoryIncreaseLevel, which didn't show up in the same log when I forced a level increase on my character. I should mention that I force a level-up by issuing the console command: adv.skill <attribute> <skillpoints> (for instance sneak 5000). I get the perk and everything, but nothing from my script is called on increase level. Got any other suggestions? Edit: Found out the solution thanks to Sjogga: http://forums.nexusmods.com/index.php?/topic/716118-cant-get-a-script-to-run-when-player-levels-up-help-please/&do=findComment&comment=5695255 The key was to add a new Questnode under Character -> Quest -> SM Event Node. and then link it to your quest, where the condition for the new Stacked Quest Node should be GetLevel, Player, >= 1. Thanks for the help! Edited March 11, 2014 by MilletGtR Link to comment Share on other sites More sharing options...
Recommended Posts