Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Why isn't this working?
- RosyThorn
-
8 posts
Why isn't this working?
I am trying to make a game. I wanted my sprite to move from room to room. You know, like move to the edge of the screen, have the back drop change and boom! your in a new room! So I did the script like this:
When (Flag) clicked
If (x position = 260) then
switch backdrop to
I also had:
When backdrop switches to
go to x:-240 y: -14
But nothing happens. Could you explain why it doesn't work and how to fix it, please?
Thank you!!
When (Flag) clicked
If (x position = 260) then
switch backdrop to
I also had:
When backdrop switches to
go to x:-240 y: -14
But nothing happens. Could you explain why it doesn't work and how to fix it, please?
Thank you!!

Last edited by RosyThorn (June 15, 2013 23:06:43)
- dr3w8
-
100+ posts
Why isn't this working?
Use "if <(x position) = >" because the maximum X position is 240, not 260.
- RosyThorn
-
8 posts
Why isn't this working?
I've actually got 240 in there. That was a miss type.
Thank you for replying!
Thank you for replying!
- dracae
-
1000+ posts
Why isn't this working?
You need to have a forever loop around the if!
Hope I help!
Hope I help!

- Discussion Forums
- » Help with Scripts
-
» Why isn't this working?