How do I send a message to last spawned object

I know that it’s possible but i can’t seem to find a way to send a message to last spawned object

2 Likes

Have the object send a message to the object that spawned it. Then have the object reply to last message

Give all the objects that the spawner can spawn a parent. Make the spawner check for that parent collision and send a message to last contacted. Then make the spawned object receive that message and reply to last message.

1 Like

I actually cant use any parent, since the code that I use for the object will be gived to the spawned object

1 Like

Just so it’s easier to understand this is the difference between mine and Galactian methods (Which are very similar). Mine doesn’t need collisions, but if you have multiple objects that will get the message from the spawned object then the spawned object will get multiple messages which may mess things up depending on the code. Galactians method needs collisions and a parent, but is fine with multiple objects.

then create an object with no code in it

1 Like

Man I whish this is an option in the messenger for different spawned objects.

Your best option is to send a value in the spawn input. Then the spawned object can extract the starting value.

3 Likes

I actually think my or Galactians methods are better than extractors just because it’s easier and gives a little more control.

It’s not good if you have several clones spawning the same objects. There’s no way for the spawner to message just the objects it has spawn.

There’s a few 3d methods that need that.

3 Likes

Galactians method deals with that if the objects have collisions. if you have multiple objects that don’t have collisions with the object it’s spawning then the extractor is best.