Discuss Scratch

BizzareUp11
Scratcher
21 posts

Scratch Can you add this new block?

When I make a sprite try to hit a target, it sometimes misses because it skips 10 steps until touching edge.

Can you add more blocks like;

When space pressed
move at {10} per second <——Add this new block
repeat until touching edge

and also can you make scratch have more frames per second

Last edited by BizzareUp11 (Dec. 18, 2014 05:39:32)

ScratchsterOVA9000
Scratcher
53 posts

Scratch Can you add this new block?

Do it like this


when green flag clicked
repeat until <touching color [#ff0088] ?>
move (10) steps
wait (1) secs


end

Last edited by ScratchsterOVA9000 (Dec. 18, 2014 07:01:45)


Check out my game, its a zombie game

http://scratch.mit.edu/projects/36494964/
when green flag clicked
forever
FACEPLANT
end

end
BizzareUp11
Scratcher
21 posts

Scratch Can you add this new block?

but that wont work because it always skips 10 steps every time. if a sprite is less than 10 steps large, it might miss
quadrupleslap
Scratcher
26 posts

Scratch Can you add this new block?

Then why don't you do

when green flag clicked
repeat until <touching [ v] ?>

move (1) steps
wait (0.1) secs
end

Also, this probably belongs in the Suggestions subforum, not the requests one. (I might be wrong)
BizzareUp11
Scratcher
21 posts

Scratch Can you add this new block?

Because I want it to move fast at a certain speed and not make it skip any blocks
shoresbeep
Scratcher
1000+ posts

Scratch Can you add this new block?

BizzareUp11 wrote:

Because I want it to move fast at a certain speed and not make it skip any blocks
Use the glide like this:

glide (1) secs to x: ((x position) + (10)) y: (y position)

BizzareUp11
Scratcher
21 posts

Scratch Can you add this new block?

I mean to move it fast at a constant speed so if a target is closer to it it will travel slower when you use glide

Last edited by BizzareUp11 (Dec. 18, 2014 16:40:08)

shoresbeep
Scratcher
1000+ posts

Scratch Can you add this new block?

BizzareUp11 wrote:

I mean to move it fast at a constant speed so if a target is closer to it it will travel slower when you use glide
Ok, use this:

when green flag clicked
forever
if <(distance to [some sprite v]) < [50]> then
glide (.5) secs to x: ((x position) + (10)) y: (y position)
else
glide (1) secs to x: ((x position) + (10)) y: (y position)
end
end

Last edited by shoresbeep (Dec. 18, 2014 17:36:49)


Zoom-
Scratcher
18 posts

Scratch Can you add this new block?

when [space] key pressed 
Move At () Per Sec
repeat until <touching [ edge] ?>

end

Last edited by Zoom- (Dec. 19, 2014 13:47:11)

Zoom-
Scratcher
18 posts

Scratch Can you add this new block?

BizzareUp11 wrote:

When I make a sprite try to hit a target, it sometimes misses because it skips 10 steps until touching edge.

Can you add more blocks like;

When space pressed
move at {10} per second <——Add this new block
repeat until touching edge

and also can you make scratch have more frames per second


Like This??

when [space] key pressed 
Move At () Per Sec
repeat until <touching [ edge] ?>

end
Langdon35
Scratcher
500+ posts

Scratch Can you add this new block?

quadrupleslap wrote:

Also, this probably belongs in the Suggestions subforum, not the requests one. (I might be wrong)
You are right.

Woohoo!
Dylan5797
Scratcher
1000+ posts

Scratch Can you add this new block?

BizzareUp11 wrote:

When I make a sprite try to hit a target, it sometimes misses because it skips 10 steps until touching edge.

Can you add more blocks like;

When space pressed
move at {10} per second <——Add this new block
repeat until touching edge

and also can you make scratch have more frames per second
It could be one glide block
when I receive [HitTarget v]
glide (1) secs to x: ((x position) + (50)) y: (y position)

when I receive [HitTarget v]
if <<touching [Target v] ?> or <touching [Edge v] ?>>
if <touching [Target v] ?>
...
end
if <touching [Edge v] ?>
...
end
stop [Other scripts in sprite v]

Powered by DjangoBB