Hi there!
I would like some help with a script I’m working on. It’s a battery pickup script, so when you pickup a battery a text pops up in the bottom left corner that says that you collected a battery.
I want it so when the text pops up it should fade out after a couple of seconds. Now they just stacks on top of each other by using an array.
Here’s my Inventory script:
var batteries = new Array();
var guiSkin : GUISkin;
function OnGUI()
{
for(var i : int = 0; i < batteries.length; i++)
{
GUI.skin = guiSkin;
GUI.Label(new Rect(90, Screen.height - 60 - (i*60), 120, 50), ("Picked up Battery"), "HUD");
}
}
I hope you guys understand!