Background image change random after game reset
evert
Member Posts: 266
Hey, its me again with another question.
I have some different backgrounds in my game.
I made a change attribute in my game reset actor - when game reset, game.color to random(1,4).
In my background actor i have:
- Rule game.color = 1
- change image
-Rule game.color = 2
-change image
....
This does work when i make a separate button that does game.color to random(1,4)
But i want my color change when the game has been reset.
My reset actor looks like this:
Rule - game.reset = 1
- Timer (this is because i want my menu to disappear/slide away first)
Reset game
change attribute: game.color to random(1,4)
Thanks
New game!: [Snake Rage]https://itunes.apple.com/us/app/snake-rage/id1463859909
Comments
If you are resetting the whole game then the change attribute wont work. It would work if the change attribute happened at the beginning of the scene instead of the end.
I'd dump all those rules, rename your BG images 1, 2, 3 and 4, and place a change attribute behaviour in the BG actor that says Change self.image to random (1,4).
It worked! but differently, i just had to change my reset game to a reset scene
My menu now slides over the last bg from the random pile and the background flows over into another background. Want to make my game seamless
New game!: [Snake Rage]https://itunes.apple.com/us/app/snake-rage/id1463859909