Hi everyone! So I was working on my new game called The game about your random life choices, when, I was trying to make a variable be set to 15 when the sprite was clicked but then it got set to 16 so nothing would appear. Then I made it so they would appear when the variable was 16 but it still wouldn't appear. Here is the code if you would like to look at it.
when this sprite clicked
if <(ButtonClicked) = [14]> then
set [ ButtonClicked] to [15]
end
Then it says that the ButtonClicked variable is 16 instead of 15.
Just to say it, I made 3 main sprites. A button that is on the left, one in the middle, and one on the right. It is on the far left sprite. So it senses what the ButtonClicked variable is so it can change costumes and hide or show them.
The code would look like this.
when green flag clicked
if <(ButtonClicked) = [15]> then
switch costume to [This Random Costume]
The reason I have the variable is because I don't want to make hundreds of messages and then it would just get crowded.