Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how do i kill a clone enemy with a clone projectile
- JonathanIsJony
-
Scratcher
1000+ posts
how do i kill a clone enemy with a clone projectile
please help
- -CyberVoid-
-
Scratcher
24 posts
how do i kill a clone enemy with a clone projectile
when green flag clicked
forever
broadcast [tick v]
end
when I receive [tick v]Hope this helps!
if <touching [projectile v] ?> then
delete this clone
end
- FancyTigerDustBall
-
Scratcher
100+ posts
how do i kill a clone enemy with a clone projectile
You would do something like this:
when I start as a clone
forever
if <touching [Projectile v] ?> then
delete this clone
end
...
end
- JonathanIsJony
-
Scratcher
1000+ posts
how do i kill a clone enemy with a clone projectile
sorry, but i'm not making a sprite just for the projectile, but i do appreciate the help!when green flag clicked
forever
broadcast [tick v]
endwhen I receive [tick v]Hope this helps!
if <touching [projectile v] ?> then
delete this clone
end
- FancyTigerDustBall
-
Scratcher
100+ posts
how do i kill a clone enemy with a clone projectile
If the projectile doesn't have a sprite how is it represented? Is it a coordinate rendered by pen?sorry, but i'm not making a sprite just for the projectile, but i do appreciate the help!when green flag clicked
forever
broadcast [tick v]
endwhen I receive [tick v]Hope this helps!
if <touching [projectile v] ?> then
delete this clone
end
- JonathanIsJony
-
Scratcher
1000+ posts
how do i kill a clone enemy with a clone projectile
no? i don't even know how to use a penIf the projectile doesn't have a sprite how is it represented? Is it a coordinate rendered by pen?sorry, but i'm not making a sprite just for the projectile, but i do appreciate the help!when green flag clicked
forever
broadcast [tick v]
endwhen I receive [tick v]Hope this helps!
if <touching [projectile v] ?> then
delete this clone
end
though i do suppose i need a new sprite
- BrainGamer1234
-
Scratcher
44 posts
how do i kill a clone enemy with a clone projectile
needs a new sprite for projectiles or you can detect touching a colour, but it would require said colour to be unique to said projectile,
- FancyTigerDustBall
-
Scratcher
100+ posts
how do i kill a clone enemy with a clone projectile
Yeah, if you're not using coordinates/pen you need to make a new sprite for the projectile. Do you need help making code for the projectiles?no? i don't even know how to use a penIf the projectile doesn't have a sprite how is it represented? Is it a coordinate rendered by pen?sorry, but i'm not making a sprite just for the projectile, but i do appreciate the help!...Hope this helps!
though i do suppose i need a new sprite
Last edited by FancyTigerDustBall (Nov. 4, 2026 16:15:19)
- JonathanIsJony
-
Scratcher
1000+ posts
how do i kill a clone enemy with a clone projectile
-swoon-nah i have it in the player sprite
Yeah, if you're not using coordinates/pen you need to make a new sprite for the projectile. Do you need help making code for the projectiles?
- linguinichef2015
-
Scratcher
19 posts
how do i kill a clone enemy with a clone projectile
If you use thesorry, but i'm not making a sprite just for the projectile, but i do appreciate the help!when green flag clicked
forever
broadcast [tick v]
endwhen I receive [tick v]Hope this helps!
if <touching [projectile v] ?> then
delete this clone
end
<touching (projectile v) ?>block, it will also check if touching projectile clones too. They're right.
Last edited by linguinichef2015 (Nov. 4, 2026 19:51:31)
- Matthobro120
-
Scratcher
82 posts
how do i kill a clone enemy with a clone projectile
If all are clones, then you can use an id variable:
when I receive [check for projectile v]
if <<touching [myself v] ?> and <(id) = [projectile]>> then //You go to a different sprite then drag it into your sprite for it to detect itself
... // Make sure the variable is for this sprite only, it's important
end
- JonathanIsJony
-
Scratcher
1000+ posts
how do i kill a clone enemy with a clone projectile
got the code working, if you want to see the project i was using it for, click here
thanks to everybody that posted here!
thanks to everybody that posted here!
Last edited by JonathanIsJony (Nov. 4, 2026 21:51:23)
- Discussion Forums
- » Help with Scripts
-
» how do i kill a clone enemy with a clone projectile