Pages: 1
Topic closed
I know there's a 'change background' control, but how can it be used so that when a character sprite reaches a specific position (say x>240 for the same of argument) the background changes to the next one in a sequence?
Offline
Have the sprite broadcast a "next background" message and have the stage use "when I receive next background"
Offline
Or, have the sprite constant set a pair of global variables to its x and y positions.
Then the stage can have a script that checks these variables and changes the background when required.
Offline
Mayhem's method will work, and I have used things like it, but it is usually cleaner to have sprites detect things about themselves and broadcast messages to let other sprites (and the stage) know when things have happened. Relying on other sprites detecting things often runs into timing problems.
Offline
Topic closed
Pages: 1