How to Use Clones Individually


#21

Thanks, now I have to think of a solution about clones bumping/detecting each other.
I can think of a way to fake it maybe.
Having two sprites jump positions between clones and have the clones colliding disappear when the sprites bump or are at similar x-y positions.
This will nag me now until I find a solution


#22

Amazing tutorial @Caramel_Puffin ! Thanks so much:)


#23

@Stradyvarious @BuildASnowman that's a really cool idea to detect when clones are bumping each other. Do you think "object" bumps "object" will do anything? (since you can put the same object in When __ bumps __) but I'm not sure if the When actually triggers.


#24

This is off topic
vvv

Why aren't you a leader anymore?


#25

This is an amazing tutorial! :D

I'm going to bookmark this, it might be useful in the future. :D


#26

I can't actually test this right now, but even if you can do "When circle bumps circle set invisibility 100", if you have a bunch of circle clones and any one of them bump eachother they will all turn invisible, which we are trying to circumvent.


#27

I had an idea but then realised it wouldn't work to get the objects individually.

Inside the rule would it work if you then use "if circle X position - circle X position < 25 And ≠ 0" – it wouldn't work because they refer to the same thing, don't they — never mind :blush:


@Niftynia75 sorry, I meant to respond but it escaped my mind. Basically, I can still do everything I need to. :slight_smile:


#28

You gave me another idea.
When clone-circle- bumps anything
(Starting with the closest clone to x pos-0)
Set a x-y value to its x-y pos value

Have each clone check its x-y pos value to the previously made x-y value set by the previous clone.
If the clones x-y pos value are close to the set x-y value, have the clone hide.
This is easier said than done.
When I get time I'll test this outcome if it works


#29

It turns out the When self bumps self does trigger when a clone bumps another clone, but I don't know what to put in to get the individual clones that bumped each other.

You can't really use check if the X and Y positions are close because it's the same value I think..


The Check If doesn't work :arrow_up: but the rule is triggered


#31

Awesome tutorial! This really helped me because I kept running into this problem :blush:


#33

Great tutorial, @Caramel_Puffin! :grinning:


#34

Thank you @MobCraft, @happyfacegirl, @MR.GAM3R, @Mathgirl. @BellaWafflez17, and @DMF! :D


#35

Omg! I bet this will be very helpful to everyone! (I'm gonna take screenshots RIGHT NOW!)


#36

Нет проблем! :smiley:


#37

Hey @t1_hopscotch! Just wanted to say I found you on Storybird! I'm @Inktail099. Ok, bot.


#38

Hm...can you help me with something,Puffy?
I can't explain this so I'll just give u example.
If we repeat 10 (just a random number)
Create a clone of this ch. is it possible to give different codes for each of the 10 clones.
Example:
Clone 1:Move forward
Clone 2: change Y by
Etc.


#39

Sure! I'm glad to help! :D

Okay, so in this example, you'd want to use a value when you clone. Let's call it "Clones". In the rule where you create your clones (when game starts, when _____ is tapped, when ____ = _____, etc.), you'd need to put a repeat block, like you said, with a create a clone block inside. But you'd also need to put a value block in there, that increased Clones by 1 (or whatever number, but in the situation you're describing, 1 would work best).


The invisibility block isn't necessary, if you want the object being cloned to do something as well. But if not, it's best to make it invisible.

In the second, when object is cloned, rule, check once if else blocks will be your best friend. However, if you want the clones to just move at different speeds, or at different angles, or a different change in x/y, don't use check once if else; it's repetitive and boring. Instead, directly put Clones in the block of your choice. For example, you could put "set angle Clones, move forward 100", and they would move in slightly different directions.
But, if you want each clone to do something completely different, check once if else blocks will help you a ton. In the when object is cloned rule, put however many check once if else blocks in relation to however many times you repeated minus 1. In this case, I repeated five times, so I'd have four check once if else blocks. For each one, put "if Clones = 1," "if Clones = 2," and so on.
Inside the blocks, put whatever you want to happen. To get the fifth action, make sure you put something in the bottom section of the last check once if else; then five things will happen instead of just four.
Also, if you want all of them to do something, do not put it in front of the check once if else blocks. They'll be delayed and the values will no longer line up. If you do put something in front of them, have the first block called be "set speed Clones", and have the check once if else blocks read "if (cloned object's) speed = 1", "if (cloned object's) speed = 2", and so on.


The outcome?

Even though that was completely random, it's what we wanted to happen. So now, you can just put whatever you want in the action spaces, and use this to create something great! :D

Wow, that was really long. XD
I hope it answered your question, but if it didn't, I'd be happy to take a look at your code and try to explain it further! :D


#40

Thanks a lot Puffy! It really answers my question that I had been wondering for a long time!


#41

No problem! :D
I'm glad I could help!


#42

Hai Puffy! I need help woth the same thing! I don't quite understand the paragraph below

I want the circle to be positioned like


I think we could use the paragraph that I quoted but idk how.;-;
The code:
(When 'game starts',don't mind the "when object a clone part "

When object is clone:

Sorry to bother you. I'm 'learning' clones and it's really interesting!
-Hero Dino