AlexxEG Posted May 28, 2010 Share Posted May 28, 2010 So I have this script to change hotkeys for a personal overhaul mod. But if I choose to change hotkey in Message box, it keeps looping. Which it's not suppose to. With looping I mean, if you see in the script it shows a message box when you enter a key. To confirm that you have set a new hotkey. However, it shows whenever I press any key, even after clicking the Done button, after I already set a new hotkey. There is no way to stop it, in short. Here is the script:scn 00POConfigQScript Short iMenu Short Button Begin MenuMode if ( iMenu == 0 ) ShowMessage 00POConfigMainMenuMESG Set iMenu to 1 elseif ( iMenu == 1 ) Set Button to GetButtonPressed if ( Button == 0 ) ShowMessage 00POConfigPressKeyMESG Set iMenu to 2 elseif ( Button == 1 ) ShowMessage 00POConfigPressKeyMESG Set iMenu to 3 elseif ( Button == 2 ) ShowMessage 00POConfigDLCMESG Set iMenu to 4 elseif ( Button == 3 ) Set iMenu to 0 StopQuest 00POConfigQ endif elseif ( iMenu == 2 ) Set POToggleNVGKey to GetKeyPress 0 if ( POToggleNVGKey > 0 ) ShowMessage 00POConfigAcceptKeyMESG set iMenu to 0 endif elseif ( iMenu == 3 ) Set POStimpakKey to GetKeyPress 0 if ( POStimpakKey > 0 ) ShowMessage 00POConfigAcceptKeyMESG set iMenu to 0 endif elseif ( iMenu == 4 ) Set Button to GetButtonPressed if ( Button == 0 ) Set iMenu to 0 StopQuest 00POConfigQ elseif ( Button == 1 ) Set iMenu to 0 StopQuest 00POConfigQ elseif ( Button == 2 ) Set iMenu to 0 StopQuest 00POConfigQ elseif ( Button == 3 ) Set iMenu to 0 StopQuest 00POConfigQ elseif ( Button == 4 ) Set iMenu to 0 StopQuest 00POConfigQ endif endif End The last iMenu (4) is not made yet, so it just closes. It worked before I inserted: iMenu(1) - Button(1) and iMenu(3) Link to comment Share on other sites More sharing options...
AlexxEG Posted May 28, 2010 Author Share Posted May 28, 2010 I found the problem. When I used "ShowMessage 00POConfigAcceptKeyMESG" and pressed ok, the action in iMenu(1) - Button(0) would start, which caused the loop. Link to comment Share on other sites More sharing options...
Recommended Posts