I have a have programmed my game to when you gather something to display a notification of what you gathered. But I wish to make a system which handles displaying multiple notifications of stuff gathered at same time. I had a think about it but can’t think of a way to do it.
Could someone give me a pointer or tip?
# Forgot to mention, It would help if in c#
Create a GUIText object “textLog”. And try this:
private var logMessages= new Array() ;
function LogMessage( message: String)
{
logMessages.Push(message);
if( logMessages.length > 10)
{
logMessages.Shift();
}
textlog.guiText.text="";
for (var log in logMessages)
{
textlog.guiText.text+=log+"
";
}
}
This will print the last 10 messages. The order is newest at the bottom.