Discuss Scratch

Arrow_Tree
Scratcher
3 posts

How do i make projectiles

I need to know how to make the player shoot a projectile when clicking for a game. Does anyone know how to do that?
-JS_Test-
Scratcher
53 posts

How do i make projectiles

Create a new sprite called “Projectiles”.

when green flag clicked
forever
if <mouse down?> then
create clone of [myself]
wait (0.5) secs
end
end

Note: The “wait” block is the cooldown between each shot.

when I start as a clone
point towards [mouse pointer]
repeat until <touching [edge] ?>
move (5) steps
end
Arrow_Tree
Scratcher
3 posts

How do i make projectiles

-JS_Test- wrote:

Create a new sprite called “Projectiles”.

when green flag clicked
forever
if <mouse down?> then
create clone of [myself]
wait (0.5) secs
end
end

Note: The “wait” block is the cooldown between each shot.

when I start as a clone
point towards [mouse pointer]
repeat until <touching [edge] ?>
move (5) steps
end

-JS_Test- wrote:

Create a new sprite called “Projectiles”.

when green flag clicked
forever
if <mouse down?> then
create clone of [myself]
wait (0.5) secs
end
end

Note: The “wait” block is the cooldown between each shot.

when I start as a clone
point towards [mouse pointer]
repeat until <touching [edge] ?>
move (5) steps
end
Thanks!

Last edited by Arrow_Tree (Feb. 3, 2024 21:37:12)

minkey46446
Scratcher
1 post

How do i make projectiles

yes it work

Powered by DjangoBB