Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » creating clones that shoot
- Double-Deal
-
47 posts
creating clones that shoot
exactly what the tile says. on level 2 the enemy gets cloned, the thing is I don't know how to make them shoot. Check out Godzilla simulator on my profile to see what I'm talking about.
- drmcw
-
1000+ posts
creating clones that shoot
Very difficult to follow scripts. You should rename sprites and costumes to make things easier. Still not sure why you have so many dependencies in costumes either as they all look the same. One problem you seem to be unaware of is that there is a mximum of 301 clones. Also clones inherit their parents scripts and so also receive broadcast messages. You don't delete clones if they miss the target so will hit the limit pretty quickly. You can see that as the fireballs gradually move up the right side of the screen and gather at the top.. A much better way to get the army guys and tanks to fire is for them to do the firing instead of the bullets themselves, so when they decide to fire get them to create a bullet or shell clone, not a repeat 50 loop in the bullet or shell sprite.
- Double-Deal
-
47 posts
creating clones that shoot
ok….how do I do that? Very difficult to follow scripts. You should rename sprites and costumes to make things easier. Still not sure why you have so many dependencies in costumes either as they all look the same. One problem you seem to be unaware of is that there is a mximum of 301 clones. Also clones inherit their parents scripts and so also receive broadcast messages. You don't delete clones if they miss the target so will hit the limit pretty quickly. You can see that as the fireballs gradually move up the right side of the screen and gather at the top.. A much better way to get the army guys and tanks to fire is for them to do the firing instead of the bullets themselves, so when they decide to fire get them to create a bullet or shell clone, not a repeat 50 loop in the bullet or shell sprite.
- drmcw
-
1000+ posts
creating clones that shoot
Think of good names for each thing and type it in. Use if touching edge then delete clone in your bullet scripts and have a shooting script in the sprites/clones that can shoot that uses create clone of bullet to shoot.
- chooper100
-
500+ posts
creating clones that shoot
If you don't know how to rename a sprite, click the ‘i’ button on the selected sprite. Then, type in a new name and click outside the box.
Anyway, if you want a demo of how @TheLogFather did this, go to this project and make sure you read the notes.
Effectively, both the bullets and the shooters are the same sprite. The collision detection is done by the bullet clones.
Anyway, if you want a demo of how @TheLogFather did this, go to this project and make sure you read the notes.
Effectively, both the bullets and the shooters are the same sprite. The collision detection is done by the bullet clones.
- Discussion Forums
- » Help with Scripts
-
» creating clones that shoot