|
Hello. These are the scripts for selecting the options for my game (mode, difficulty, etc.). How it works is that the menu are a bunch of toolbars. Each toolbar option selected represents a number, that number represents a number in a different script, and that other script contains the functions that start the options (like "Standard difficulty=true") If I define something to happen in the script that has the toolbat GUI like this, the other variable (in this case, "Score") works, Its changed to whatever is defined.
} I then tried to make a variable in the GUI script affect a variable in another script (in this case the "ArcadeOptions" script) :
(Here is the ArcadeOptions Script) static var Mode = 5;
} and it works, the Score value is changed. The problem happens when I try to have the "ModeInt==" something other than 0(so that other buttons can affect the "ArcadeOptions" script). No matter what the element of that toolbar is, if it is not 0, nothing happens in the other script, what is going on(I am getting no errors from unity)? Thanks
(comments are locked)
|
|
You need to create a reference to the instance of the first script. Do I put that in the script with the GUI or in the "ArcadeOptions" script? Am I writing the script backwards compared to yours (I have the toolbar affect the variable in the "ArcadeOptions" Script, are you having the "ArcadeOptions" script read the changes in the GUI script?
Dec 13 '10 at 03:38 AM
Tyler 2
(comments are locked)
|
