Discuss Scratch

Policeguy44
Scratcher
24 posts

How do you make the enemy automatically shoot?

How do I make the enemy sprite in my game shoot automatically? If you know, please put the script with your reply.


My project: http://scratch.mit.edu/projects/42006732/
deck26
Scratcher
1000+ posts

How do you make the enemy automatically shoot?

I'll just explain with words if I can - I find it much quicker for most things!

Decide when the enemy should fire - eg when player is within a certain distance, at set intervals or what?

When firing you can either create a clone or use another sprite for the shell. In either case the shell starts at the enemy tank and is pointed towards the player and then moves (move x steps, wait y seconds - repeatedly) until it either hits the player or the edge.
Mr_Lee10
New Scratcher
1 post

How do you make the enemy automatically shoot?

How do you make an emey fire within a cretain distance to the main character?
LewisTheBeast2404
Scratcher
3 posts

How do you make the enemy automatically shoot?

I'm not sure if this would work but you could try to do this:

whenclickedforeverifdistancetosprite=how ever farawaythenpointtowardssprite that you chosemovestepsend

I'm not sure whether that will work please let me know if it does
Pratik12
New Scratcher
2 posts

How do you make the enemy automatically shoot?

Guys i am making a game on ben ten. I dont know how to make the drones (enemy) shoot stinkfly(ben 10 player). Can someone help me? I want to make the drones shoot ben 10 automatically.

Last edited by Pratik12 (March 9, 2017 09:14:13)

deck26
Scratcher
1000+ posts

How do you make the enemy automatically shoot?

Pratik12 wrote:

Guys i am making a game on ben ten. I dont know how to make the drones (enemy) shoot stinkfly(ben 10 player). Can someone help me? I want to make the drones shoot ben 10 automatically.
Please create your own topic rather than posting on an old one belonging to someone else - called necroposting.
Pratik12
New Scratcher
2 posts

How do you make the enemy automatically shoot?

ok sorry
hedgehog_blue
Scratcher
1000+ posts

How do you make the enemy automatically shoot?

Policeguy44 wrote:

How do I make the enemy sprite in my game shoot automatically? If you know, please put the script with your reply.


My project: http://scratch.mit.edu/projects/42006732/
Do you want it to shoot all the time or only shoot when some certain requirement is met?
Maanas0709
Scratcher
5 posts

How do you make the enemy automatically shoot?

can somebody tell me how to make enemy tank automatically shoot ????????????????????????????????????????????????????????????????????
Maanas0709
Scratcher
5 posts

How do you make the enemy automatically shoot?

try this
Go in the drone sprite
do this
whenclickedforeverifkeypressed?thencreatecloneof stinkfly

then go in the stinkfly sprite
whenIstartasacloneshowforevergoto dronepointtowardsben 10repeatuntiltouching Ben 10?ortouching edge?move20stepsdeletethisclone

And the delete this clone should be bellow the repeat until
Maanas0709
Scratcher
5 posts

How do you make the enemy automatically shoot?

and if you want reload add this

whenclickedforeveriftouching?thencreatecloneof stinkflywait0.3secs

Powered by DjangoBB