I am working on a 1 sprite 1 script 1 costume game, everything is going well, until the variable switch. It switches from 1 to 2, I try to make it go away from the goal so it can only change by one....it is frustrating!! Can somebody try help? Thanks
Offline
I'm sorry - I don't quite understand what your problem is. Can you describe in greater detail?
From what I understand, when it switches to 2, you want it to move away from the goal? Or maybe you don't want it to go any further than 2? I don't understand, sorry.
Offline
coolstuff wrote:
I'm sorry - I don't quite understand what your problem is. Can you describe in greater detail?
From what I understand, when it switches to 2, you want it to move away from the goal? Or maybe you don't want it to go any further than 2? I don't understand, sorry.![]()
your right I apologize . What I mean to say is, the level variable is changing by 2, so all the levels cant be drawn. I think the reason is the variable is changing too rapidly while touching the goal. I want it to change only by one. hopefully that helps
Offline
coolstuff wrote:
I'm sorry - I don't quite understand what your problem is. Can you describe in greater detail?
From what I understand, when it switches to 2, you want it to move away from the goal? Or maybe you don't want it to go any further than 2? I don't understand, sorry.![]()
I mean it changes from 1 to 3, not 1 to 2
Offline
Okay, you need to have it reset the player and change the level in the same step. Make sure you don't have two scripts doing it, cuz it doesn't adjust until the motion blocks.
Offline
AtomicBawm3 wrote:
Okay, you need to have it reset the player and change the level in the same step. Make sure you don't have two scripts doing it, cuz it doesn't adjust until the motion blocks.
ok, this seems to make sense.....but when it resets, i dont know what you mean, it is changing by 2, so the second level doesnt come
Offline
platform710 wrote:
AtomicBawm3 wrote:
Okay, you need to have it reset the player and change the level in the same step. Make sure you don't have two scripts doing it, cuz it doesn't adjust until the motion blocks.
ok, this seems to make sense.....but when it resets, i dont know what you mean, it is changing by 2, so the second level doesnt come
Rather than having them as two separate scripts, putting them in the same procedure should make sure it goes through it in the same order you want them in. So rather than:
Wrong
When Green Flag clicked
Forever
If touching [door]
change level by 1
==
When Green Flag clicked
Forever
If touching [door]
go to x: 50 y 50
==
Do something like this:
Correct
When Green Flag clicked
Forever
If touching [door]
change level by 1
go to x: 50 y 50
==
Or however you end up doing that. The point is, combine them into one script.
Offline
http://scratch.mit.edu/projects/platform710/1319733 here is the game!
Last edited by platform710 (2010-10-10 10:21:20)
Offline