drakeelvin Posted May 11, 2011 Share Posted May 11, 2011 I have a section of script to change gameplay settings on level up; however, I am wondering where would be the place to put it? Could I create a script for the "Player" NPC that monitors the player's changing level and takes action? Or is there a particular existing script involved in the level up process that I could modify? Thanks! Link to comment Share on other sites More sharing options...
rickerhk Posted May 11, 2011 Share Posted May 11, 2011 I have a section of script to change gameplay settings on level up; however, I am wondering where would be the place to put it? Could I create a script for the "Player" NPC that monitors the player's changing level and takes action? Or is there a particular existing script involved in the level up process that I could modify? Thanks! I've done it in a quest script. I wouldn't modify the player object in any way. scn MyLevelUpQuestScript short iLevelupFlag short iCurrentLevel short iPreviousLevel BEGIN MenuMode 1027 ;------------ Level-Up menu ------------------ set iLevelupFlag to 1 return END BEGIN GameMode if iCurrentLevel == 0 ;first time init set iCurrentLevel to Player.GetLevel set iPreviousLevel to iCurrentLevel else set iCurrentLevel to Player.GetLevel if (iLevelupFlag) if (iCurrentLevel == iPreviousLevel) ;Do nothing. Some perk mods use menumode 1027 else ;Do things when level changes set iPreviousLevel to iCurrentLevel set iLevelupFlag to 0 endif endif endif END Link to comment Share on other sites More sharing options...
drakeelvin Posted May 11, 2011 Author Share Posted May 11, 2011 Awesome, thanks so much RickerHK! I am brand new to quest scripts, in fact now that I finally finished up my companions pretty much to my satisfaction I want to start working on some simple quests for them -- was thinking of adding a quest pack like an add on to the companion so I could add more later. With that quest script of yours will it always get scanned by the game engine as-is or do I need some way to trigger it? Link to comment Share on other sites More sharing options...
rickerhk Posted May 11, 2011 Share Posted May 11, 2011 Awesome, thanks so much RickerHK! I am brand new to quest scripts, in fact now that I finally finished up my companions pretty much to my satisfaction I want to start working on some simple quests for them -- was thinking of adding a quest pack like an add on to the companion so I could add more later. With that quest script of yours will it always get scanned by the game engine as-is or do I need some way to trigger it? You could have the quest start in a dialog result script:StartQuest MYLevelUpQuest Or have it 'start game enabled' and put a condition on whether you want it to do it's thing. A quest script that is running is always processed by the game every 5 seconds by default. Link to comment Share on other sites More sharing options...
drakeelvin Posted May 12, 2011 Author Share Posted May 12, 2011 Thanks again, HK! Link to comment Share on other sites More sharing options...
Recommended Posts