I have a script that I am working on. I have a GUI.Box set up with the with 25 openstring descriptions. I want to have it where I can take that script with my slavetooltip script and make it so when I click on a model in my scene, a box pops up with all of the information I need.
Now the problem Im having is that the box is staying in the scene all the time. So when I click on the object, the text is only popping up inside that box whenever I click on an object in my scene.
Here is how it is set up…at the top of the java script, it reads this…
var displaymessage:String;
var openstring:String;
var descStyle:GUIStyle;
Then it has this…
GUI.Box(Rect(Screen.width/2-200,Screen.height -160,400,150),openstring,descStyle);
switch(displaymessage){
case "Ninja Knife": openstring="Description: One of the most deadliest weapons for combat.\n\nFunction: It slices and dices the enemy. Very Sharp Blades.
break;
default : openstring="";
break;
}
This is in my main script for the current scene, and then I have that custom slavetooltip that I used for each model so that the information will pop up once clicked.
But I know I would ahve to use an ElseIf statement right? But I dont know where to put it, or how to write it