[SOLVED] Attaching text to a random number of objects

Hello Everyone,

I am creating a random number of targets (between 5 and 20) which are travelling in random angles out of the screen. I would like to attach a text object that displays the distance between the spawn point and the travelling target.
If I do it in the way below, I can (as expected) attach the text object to one target only and it shows as intended the distance:

If I want to do this for all randomly created targets, which I did like so:

The text is attached to the targets but they are constantly created leaving a trail:

If I add ‘Trigger once’ the text object is created but it does not move with the targets.

It would be great if someone could let me know what I am doing wrong here.

What you want to do is link the two instances together. Just after creating the two object in the first event, link the speed object to the target object. In the second event, add a take into account linked objects action.

1 Like

Hi arthuro,

That’s it. So far I did not really understand the linked objects but after some trial and error I got it working. I would never have been able to figure that out by myself.

Thank you very much

1 Like