1 decade ago by ShawnSwander
I was trying to make a narration script so the player can see "The orc hits you." at the bottom of his screen. I wanted to show the last 4 messages at one time and possibly allow the player to look back to see 30-50 messages in a log if they want. To do this I set up and object and an array to push the objects into.
So I set up some variables like this
and when I use this command multiple times with different data
it overwrites the entire array with copies of that data... any idea why or what I can do about it.
So I set up some variables like this
servermessage: {"color1":"yellow", "color2":"white", "message1":"", "message2":""}, servermessagelist: new Array(),
and when I use this command multiple times with different data
ig.game.servermessagelist.push(ig.game.servermessage)
it overwrites the entire array with copies of that data... any idea why or what I can do about it.