Discuss Scratch

Lukder
Scratcher
10 posts

Make a shooter game

How do you make a player shoot something
Code_Weegee
Scratcher
100+ posts

Make a shooter game

try something like this:
when I receive [shoot v]
create clone of [Myself v]

when I start as a clone
go to [probably the player/weapon v]
point towards [something, probably the mouse cursor but idk v]
forever
move (whatever speed you want the projectile to move at) steps
if <touching [edge v] ?> then
delete this clone
end
if <touching [some sprite idk v] ?> then
delete this clone
end
end
hiitsdom312-12
Scratcher
4 posts

Make a shooter game

What
SunnyPanda86
Scratcher
3 posts

Make a shooter game

Real Helpful Bruh. Now my project will not be Trash
borksonthesecond
Scratcher
61 posts

Make a shooter game

Code_Weegee wrote:

try something like this:
when I receive [shoot v]
create clone of [Myself v]

when I start as a clone
go to [probably the player/weapon v]
point towards [something, probably the mouse cursor but idk v]
forever
move (whatever speed you want the projectile to move at) steps
if <touching [edge v] ?> then
delete this clone
end
if <touching [some sprite idk v] ?> then
delete this clone
end
end
you should probably add something like this too
when [space v] key pressed
broadcast [shoot v]
DrCode616
Scratcher
1 post

Make a shooter game

Tried this but it teleports through the floor at certain angles because it moves 20 steps at a time which is enough to avoid touching the floor sprite. I can lower the speed but for the game I'm working on I need it to travel relatively fast (preferably 30-50 steps). Any help will be appreciated. :3
N8_D_GR8_1
Scratcher
1000+ posts

Make a shooter game

DrCode616 wrote:

Tried this but it teleports through the floor at certain angles because it moves 20 steps at a time which is enough to avoid touching the floor sprite. I can lower the speed but for the game I'm working on I need it to travel relatively fast (preferably 30-50 steps). Any help will be appreciated. :3
In the future, please create a new topic for any questions you have.

To answer your question, make a custom block called “move in steps (steps) steps”. Make it run without screen refresh.

define move in steps (steps) steps//when you create this block, you MUST check the "run without screen refresh" checkbox.
repeat (steps)
move [1] steps
if <touching (floor v)> then
delete this clone//or do whatever else you want to do when it hits the floor
end
end

Then, in your code, replace this block:
move (20) steps
with this block:
move in steps (20) steps::custom
SunnyPanda86
Scratcher
3 posts

Make a shooter game

Thnx
LorenzoPSTAA
New Scratcher
1 post

Make a shooter game

how do you do something simple
SunnyPanda86
Scratcher
3 posts

Make a shooter game

wut do u mean

Powered by DjangoBB