# Show picture at 2nd from 2nd called variable(hard to explain)

#### mpurnell

##### Veteran
pretty much im going to be showing 6 pictures showing the latest things that have happened in the game using 30 variables.
so for example,

in spot 1, i want it to show whichever is the latest called variable(so say we r up to stage 13) so
spot 1 = 13
spot 2 = 12
spot 3 = 10
spot 4 = 9
spot 5 = 7
spot 6 = 6

as you can see, some variables/switches wont be called if some events dont happen in game.
and when something happens, then ofcourse spot 1 = 14, and the rest follows down
ive been trying to about a week to try and get this done with no prevail

#### Poryg

##### Dark Lord of the Castle of Javascreeps
It's easy.
I would have solved it not through 30 variables, but only 6 variables, each for one picture spot. These 6 variables would contain values from 0 to 30.
And the rest is a huge if else spider.
If variable 1 is equal to 1, show this picture on spot 1. If equal to 2, show that picture.
Of course it is possible to solve without this spider, however you need javascript knowledge.

#### mpurnell

##### Veteran
It's easy.
I would have solved it not through 30 variables, but only 6 variables, each for one picture spot. These 6 variables would contain values from 0 to 30.
And the rest is a huge if else spider.
If variable 1 is equal to 1, show this picture on spot 1. If equal to 2, show that picture.
Of course it is possible to solve without this spider, however you need javascript knowledge.

unfortunately your idea wont work. a simple show picture 2 will override spot one. i need it, for example, if i receive an sms on my phone, the newest message will appear up top, whilst the second message would ofcourse appear below, and the rest would go lower too. and if i receive another message, the continuation continues

#### Poryg

##### Dark Lord of the Castle of Javascreeps
Show picture 2 will not override spot one if those two pictures have a different ID, which you can set here:
So simply have up to six pictures, one for each spot, and six variables that determine which picture is shown in each spot.

### Latest Profile Posts

Game Making Every Day #19

Uploaded my short game to itch.io just to see how it works... It doens't. Failed to load IconSet.png it says.
Yeah okay. Not wasting another second on it. :\
I wonder if anyone would be interested in free character art from me...