This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-03-30 23:57:29

ksahs
New Scratcher
Registered: 2011-03-30
Posts: 2

stuck!!

alright so I'm making a sort of "power bar" for a game and it involves two sprites, the actual bar itself and a needle that is supposed to go back and forth within the bar and stop once the space bar is pressed. Trouble is, I can't get it to stop unless it's at one of the ends.
Here's kinda what I have so far...
[forever
  glide to (x coordinate of the end of the meter, y constant)
  glide to (x coordinate of the opposite end of the meter)
]

[When space key pressed
  go to x position (again y constant)
]
end script

What this does is makes it glide back and forth continuously even when the space bar is pressed.

Thoughts?

Offline

 

#2 2011-03-31 12:31:27

jukebox2000
Scratcher
Registered: 2010-12-10
Posts: 25

Re: stuck!!

I tried but the gliding thing kind of restricts your choices. You might have to ditch the power bar and maybe make an addition question or something like that for your power. I hope this helps in some god-known way  big_smile


"What is the airspeed velocity of an unladen sparrow???"
http://1.bp.blogspot.com/_ZzXevucGsR4/S8JWCBQg18I/AAAAAAAAACg/Gde_kqHHFvA/S1600-R/Game+Fudge+Title+2a.jpg My page: http://scratch.mit.edu/users/jukebox2000

Offline

 

#3 2011-03-31 12:48:58

ksahs
New Scratcher
Registered: 2011-03-30
Posts: 2

Re: stuck!!

I did indeed ditch the power bar, this is for a project so for now I'll skip but I will not accept defeat! I'll come back after I turn this in to try and incorporate this elusive power bar.

Offline

 

#4 2011-03-31 12:56:06

jukebox2000
Scratcher
Registered: 2010-12-10
Posts: 25

Re: stuck!!

I just had a thought though. You will have to view it on my account though. so keep checking until it appears. It will have your scratch name on it.


"What is the airspeed velocity of an unladen sparrow???"
http://1.bp.blogspot.com/_ZzXevucGsR4/S8JWCBQg18I/AAAAAAAAACg/Gde_kqHHFvA/S1600-R/Game+Fudge+Title+2a.jpg My page: http://scratch.mit.edu/users/jukebox2000

Offline

 

#5 2011-03-31 13:24:37

jukebox2000
Scratcher
Registered: 2010-12-10
Posts: 25

Re: stuck!!

Here's the link to the video (sorry if it doesn't work. If not, go to my account page and click the powerbar demo with your name on):
http://scratch.mit.edu/projects/jukebox2000/1692599

Hope this helps even more :


"What is the airspeed velocity of an unladen sparrow???"
http://1.bp.blogspot.com/_ZzXevucGsR4/S8JWCBQg18I/AAAAAAAAACg/Gde_kqHHFvA/S1600-R/Game+Fudge+Title+2a.jpg My page: http://scratch.mit.edu/users/jukebox2000

Offline

 

Board footer