New Clone Index & Total Clones

I thought it may not be immediately obvious that the easiest way to create clone is no longer with a repeat loop.

All you need is a When ____ < ____ event like this. Your clones will be created & now automatically indexed. Then just put a custom Initialization block in When Game Starts and When Object is Cloned.

This also has the advantage of the previously used fast cloning method, where 2^n clones are created in n steps (since all existing clones participate in the cloning during each step, not just the original object)

Then just put whatever you want in the custom Initialization block. In this example I put a couple lines of code to create block lettering that reference the Clone Index & Total Clones traits:

Block Lettering project link

10 Likes

Wait so what exactly does clone index do?

3 Likes

It’s a value that represents each clone.

3 Likes

It’s a value that represents each clone.

Right, so each clone gets a unique value or Clone Index. Starting with the original object which is Clone Index 1. Then you can use the Clone Index make make each clone do something different.

In the Block Text example, the Clone Index is used to give each of the clones a different circular position (i.e. using the cosine & sine formulas) at 10 deg intervals. And both the Clone Index & Total Clones are used to vary the brightness of the text color as a normalized ratio of the Clone Index.

4 Likes

You just gave me the answer to my Minecraft game

2 Likes

no problem I guess xD