Discuss Scratch

drazeraxe
Scratcher
4 posts

How to make battle cat on scratch

I cant figure out how to do that , thing likes clone affect a single clone or clone getting affect by other clones or SO MANY

the list I cant understand
1. clones only affect 1 clone
2. clones only affect other clones in a time then affect again
3. CLONES taking effects that have cooldown without make it dont take effect from other clones
cIoudyness
Scratcher
500+ posts

How to make battle cat on scratch

I’ll try my best but if you have stuff coded already that would be helpful
1. code only affecting one clone
you can use local variables for this. change the variable before you create each clone and suddenly every clone has its own id. reference it under your clone hat block with an if loop and you can put your code in there.

2. clones affecting other clones, on a cooldown
it depends what you need (specifics are nice) but for clones from one sprite to affect/change other clones from the same sprite you probably need lists and local variables.
for example if you were making a tower defense game (hint hint) and you wanted to code a tower, then some helpful stuff would be as follows:
a list of the x positions of all the enemy clones (so your tower could calculate the closest enemy, or the closest enemy to the cat base, and fire at it)
a bullet projectile of some kind that the clones detect when touching, and something happens off that
enemy clones carrying local variables for their health, etc

3a. clones taking an effect and still taking other effects at the same time?
this is pretty easy. maybe separate your effects (e.g. bullets, or potions, or whatever you wanted) into different sprites so your clones can detect what they’re touching and what effect should be applied
3b. more than one clone taking the same effect (think like a mine that hurts more than one clone)
for this you’re probably thinking like a rocket or something, so maybe make the rocket costume turn bigger when it explodes. then, just detect touching like normal.

sorry if I wasn’t very specific. i couldn’t really answer this well but it’s also anxiety inducing to see a topic go unanswered
CaliMali18
Scratcher
1 post

How to make battle cat on scratch

thank you but my sister is not letting me to use youtube

Powered by DjangoBB