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

#1 2012-10-31 14:33:40

Fernandop91
New Scratcher
Registered: 2012-10-30
Posts: 8

Trying to make a Sprite move straight up

I have this idea for a game and I am getting stuck on making a sprite move in a straight line up. So I have the Sprite played by the character, Sprite1, and he is going to "shoot" Sprite 2. I am using the glide function so it appears on the screen but it forces me to use two options, an x and a y position. I simple want it go to straight up from where Sprite1 fired it from. so I am at (0,-180) if i fire Sprite2 in my head it needs to go to (0,180), ignoring the x axis. For the other Motion commands I have tried the movement happens instantly or is not visible to the eye which again is probably happening in .01 seconds.

Offline

 

#2 2012-10-31 15:06:12

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Trying to make a Sprite move straight up

use either

glide (x) secs to x: (x position) y: (wanted y)
or
repeat (x)//or repeat until touching edge
change y by (speed)


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#3 2012-10-31 15:34:00

Fernandop91
New Scratcher
Registered: 2012-10-30
Posts: 8

Re: Trying to make a Sprite move straight up

I must have overlooked those by accident. I think i was too focused on making the glide work. Thank you so much! I will post the game as soon as I am done.

Offline

 

Board footer