TheBlob2 Posted June 17, 2015 Share Posted June 17, 2015 I've been trying to figure out how to trigger a certain function but only after the player has leveled up but there doesn't seem to be any obvious ways of doing so Link to comment Share on other sites More sharing options...
Ladez Posted June 17, 2015 Share Posted June 17, 2015 This quest script should do it: int iOldLvl int iNewLvl Begin GameMode ; For initialization purposes if the variable is empty. The first level is 1. If iOldLvl == 0 Set iOldLvl to 1 EndIf ; Retrieve the player's level. Set iNewLvl to Player.GetLevel ; Has the player gained a level since last time? If iNewLvl > iOldLvl Set iOldLvl to iNewLvl MessageBoxEx "You have just levelled up!" EndIf End It will show a message (note that MessageBoxEx is an NVSE function) everytime you gain a level. If you want only a specific level to trigger an event, you can set iOldLvl to that level, change the condition to iNewLvl == iOldLvl, and put a StopQuest command after the message. Link to comment Share on other sites More sharing options...
Fallout2AM Posted June 17, 2015 Share Posted June 17, 2015 You probably could make good use of MenuMode 1027 Link to comment Share on other sites More sharing options...
Ladez Posted June 17, 2015 Share Posted June 17, 2015 That is an even better idea. :ohmy: Link to comment Share on other sites More sharing options...
TheBlob2 Posted June 17, 2015 Author Share Posted June 17, 2015 You probably could make good use of MenuMode 1027I don't want the script to trigger when the player is in the level up menu, I want to to trigger right after they have allocated their skill points and picked a perk etc, then the script triggers Link to comment Share on other sites More sharing options...
Fallout2AM Posted June 17, 2015 Share Posted June 17, 2015 You probably could make good use of MenuMode 1027I don't want the script to trigger when the player is in the level up menu, I want to to trigger right after they have allocated their skill points and picked a perk etc, then the script triggers You can still make good use of it. Link to comment Share on other sites More sharing options...
luthienanarion Posted June 18, 2015 Share Posted June 18, 2015 Set a flag variable in MenuMode 1027 and check the value of it in GameMode. Link to comment Share on other sites More sharing options...
llamaRCA Posted June 18, 2015 Share Posted June 18, 2015 Set a flag variable in MenuMode 1027 and check the value of it in GameMode. This is the solution for doing something once the player is out of the menu. I use MenuMode 1027 regularly for tracking player levels and doing stuff with that info. Link to comment Share on other sites More sharing options...
Recommended Posts