Shadow Clone or object spawner

Hello, so currently I am trying to get my snake to grow as it consumes points but whenever I try to add “player is in collision with points” condition the shadow clone effect stops working completely. I’ve been trying to get them to connect but I have no clue what I’m doing wrong.

I’ve been thinking maybe I can use the object spawner instead of shadow clone. Like if a player is in collision with points it will spawn a new addition to its tail. Is there a way to connect the shadow clone to the points or maybe the 2nd option is better?

##**How do I: Make my snake tail grow in correlation to what points it eats

What is the expected result

If Object player is in collision with points then
Points add to player score and adds an amount of shadow clones to simulate growing

Explain what should happen when you run the game.
When the points delete the tail show grow

What is the actual result

Every time I add player is in collision with points to shadow clone action the clones stop appearing completely
Explain what is happening instead, what is going wrong.

Related screenshots

Please include a screenshot of the full related events including both conditions and actions.
And screenshots to help showing us the issue.

Project files (optional)

Insert a minimal game showing your issue in a .zip or .rar.

The shadow clone action needs to run on each frame. Instead of using a fixed number for the copies use a variable like Length or Copies. It could be a global, scene or object variable like Head.Copies

Anytime you want the length to grow, increase the variable.

The segment object is already in the scene and is used as the pickup object.

1 Like

Great minds think the same way
I already explained it to Emar

1 Like

Nice. For extra points. Here’s a way to make each segment the color of the pickup object.

3 object variables with the default value of 0

Head.LastColor
Body.Color
Segment.Color

I already had a bunch of segments in the scene otherwise set the color of the Segments as they’re spawned.

1 Like