Discuss Scratch

complex
Scratcher
10 posts

Making clones shoot bullets

After a cloned bullet has been created, how can I get it to move to a clone?
Or is this impossible, and I just have to wait until the clone system is changed back to clone spawns at parent?
heroguy15
Scratcher
27 posts

Making clones shoot bullets

you set two variables to the clone that is shooting's x and y positions (x variable, y variable) and set the bullet to go to x= (x variable) and y = (y variable). there is probably a less complicated way to do this, but that is what I would do.

Last edited by heroguy15 (Feb. 27, 2013 23:08:57)

cmot
Scratcher
89 posts

Making clones shoot bullets

drmcw
Scratcher
1000+ posts

Making clones shoot bullets

heroguy15 wrote:

you set two variables to the clone that is shooting's x and y positions (x variable, y variable) and set the bullet to go to x= (x variable) and y = (y variable). there is probably a less complicated way to do this, but that is what I would do.

Yes that was what I did in this shooting game. The bug sprite has a drop bomb function which sets x and y coordinates of the clone in 2 variables before calling a create clone for a bomb.

Last edited by drmcw (March 13, 2013 11:49:11)

Aditya007
Scratcher
42 posts

Making clones shoot bullets

Clone Startup
Go to Gun ''or whatever
repeat until touching edge
move 5 steos
end
hide
botcrusher
Scratcher
500+ posts

Making clones shoot bullets

Serenity shows this very well
MMHMMH
Scratcher
100+ posts

Making clones shoot bullets

complex wrote:

After a cloned bullet has been created, how can I get it to move to a clone?
Or is this impossible, and I just have to wait until the clone system is changed back to clone spawns at parent?

heroguy15 wrote:

you set two variables to the clone that is shooting's x and y positions (x variable, y variable) and set the bullet to go to x= (x variable) and y = (y variable). there is probably a less complicated way to do this, but that is what I would do.
you also have to make the clone set the variables to it's Y position and X position.
setxtoxpositionsetytoyposition
cpattelli
Scratcher
9 posts

Making clones shoot bullets

whenclickedplaysound ahhhhhh dead peps and gunsswitchbackdroptoexplodeandwait
cpattelli
Scratcher
9 posts

Making clones shoot bullets

dashabla21
New Scratcher
1 post

Making clones shoot bullets

How do i get the bullet to shoot at the opponent?


benhause
Scratcher
12 posts

Making clones shoot bullets

but how would u make the bullets go at different times is my question, like if u were making an 2d retro game? so that u can shoot infinite bullets?
ChannelMiner
Scratcher
4 posts

Making clones shoot bullets

dashabla21 wrote:

How do i get the bullet to shoot at the opponent?


whenIstartasaclonepointindirectionEnemy

Last edited by ChannelMiner (Dec. 13, 2016 09:47:37)

-frostyiceprincess-
Scratcher
1000+ posts

Making clones shoot bullets

ChannelMiner wrote:

dashabla21 wrote:

How do i get the bullet to shoot at the opponent?


whenIstartasaclonepointindirectionEnemy
1. Please do not necropost. The last post was over half a year ago.
2. Please don't use Scratch Blocks to talk, it makes it harder to read.
rararararararar
Scratcher
12 posts

Making clones shoot bullets

MMHMMH wrote:

complex wrote:

After a cloned bullet has been created, how can I get it to move to a clone?
Or is this impossible, and I just have to wait until the clone system is changed back to clone spawns at parent?

heroguy15 wrote:

you set two variables to the clone that is shooting's x and y positions (x variable, y variable) and set the bullet to go to x= (x variable) and y = (y variable). there is probably a less complicated way to do this, but that is what I would do.
you also have to make the clone set the variables to it's Y position and X position.
setxtoxpositionsetytoyposition
But what if you want to make multiple clones? What then?
footsocktoe
Scratcher
1000+ posts

Making clones shoot bullets

complex wrote:

After a cloned bullet has been created, how can I get it to move to a clone?
Or is this impossible, and I just have to wait until the clone system is changed back to clone spawns at parent?

Here is one way to handle cloned guns and bullets…

https://scratch.mit.edu/projects/167233681/
FHERJIMOR
Scratcher
1 post

Making clones shoot bullets

How do I get clones of seperate enemies have their own projectiles?
deck26
Scratcher
1000+ posts

Making clones shoot bullets

FHERJIMOR wrote:

How do I get clones of seperate enemies have their own projectiles?
Please create your own topic rather than necroposting.

https://scratch.mit.edu/projects/111228685/ may help.
Maanas0709
Scratcher
5 posts

Making clones shoot bullets

See my project and everything will be fixed
https://scratch.mit.edu/projects/376731230/editor

This is for multiple clones.
meetthemaster
Scratcher
1 post

Making clones shoot bullets

what if i have more than one clone
deck26
Scratcher
1000+ posts

Making clones shoot bullets

meetthemaster wrote:

what if i have more than one clone
Doesn't matter, same method still works.

Powered by DjangoBB