Ok, I have a global variable set called LibraryMode set by default to 0
I have a button called LibraryControls each time I click on the button I want it to change the number of the Global varable to something else.
I have done something wrong along the way because the first time you click it, It does indeed change from 0 to 1 like I want but each time I click it after that it does not change the numbers accordingly could someone help me figure out what im doing wrong.
Here is my code.
Code: ags
I have a button called LibraryControls each time I click on the button I want it to change the number of the Global varable to something else.
I have done something wrong along the way because the first time you click it, It does indeed change from 0 to 1 like I want but each time I click it after that it does not change the numbers accordingly could someone help me figure out what im doing wrong.
Here is my code.
function LibraryMode_OnClick(GUIControl *control, MouseButton button)
{
if (LibraryControls == 0) SetGlobalInt(LibraryControls, 1);//(sets to 1 library mode)
else
if (LibraryControls == 1) SetGlobalInt(LibraryControls, 2); //(sets to 2 Exterior Scanner mode)
else
if (LibraryControls == 2) SetGlobalInt(LibraryControls, 3); //(Sets to 3 Interior Scanner mode)
else
if (LibraryControls == 3) SetGlobalInt(LibraryControls, 4); //(Sets to 4 Science Reports)
else
if (LibraryControls == 4) SetGlobalInt(LibraryControls, 0); //(sets back to 0 select mode
}