Sorry for the title. The message window does close but it now appears in every button I click on the menu. Code snippet below:
scn RecycleBinScript; Recycle Bin which converts items of one type to another; 1. Display as buttons.; 2. If has items needed to create, do it; otherwise display "error" messageshort ButtonBegin OnActivate if IsActionRef player == 1 ; display message box of possible actions ShowMessage RecycleMainMsg endifEndBegin GameModeset Button to GetButtonPressed if ( Button == 0 ) ; ** Information Message on how the machine works ** player.ShowMessage RecycleInfoMsg endif if ( Button == 1 ) if ~itemcount is < required amount -1 ~display generic failed message else ~itemcount is >= required amount ~display generic success message ~remove required item(s) ~add new item(s) endif endif if ( Button == 2 ) ...
~ denotes a shorthand explanation of what my code does in those areas.
Button 0 will display a message when I click on it, and clicking ok dismisses the message and allows me to activate the machine again. Problem is, when I select any other button in the list the message from Button 0 opens once each time. I thought the 'endif' above Button 1's entry would close off Button 0 and stop the message displaying on other button clicks. Could someone hint at why it's not doing that?