# How do you do dynamic trail art

#1

This is like the 10th topik I’ve made ehh.

Anyways how do you? I know every other use of trail art though heheh

I’ve been using many ways to do code, but one thing I never went into was dynamic art. Anyways hehe, when I make an animated battle this is necessary.

@Valgo if you’re there I would be the best at this
Anyways help. No one even uses this. Hehe @CreationsOfaNoob I think your projection 3D thingy had it hehe.

I don’t want to copy from anyone’s projects hehe.

I put the topik in math because it is.
<@POMTL>

#2

Examine this

That’s the best way to learn, should make sense to you as you read the code

#3

#4

I had that in my bookmarks. I have already read it and memorised it, but kept it because I knew it would come in handy ^

#5

Well you should because that’s the easiest way to learn

#6

Ok then thanks

#7

Ahh, I was trying to see if valgo made a topik about it.
Wait now I understand it! What happens is there are scenes, and when one is complete new trails are drawn and the old ones are covered. Makes sense!

#8

Now with Clone Index built in to Hopscotch, you don’t need to create variables for it.

#9

I fixed the mistake in the title.

#10

Oh thanks. But what do you mean about clone indexes replacing variables? They’re totally different.

#11

In the tutorial you create a variable to keep track of Clone ID

#12

How?

#13

Ok thanks

#14

This is gonna be good (I want a dynamic trail art for the road in my Car game. I’ll make a copy first so if that causes it to die, I have a safety measure.)

#15

Valgo’s explanation creates dynamic trail art but only moves one endpoint at a time. That’s a significant restriction.

To smoothly move both endpoints, you need to Set Position of the line twice during each frame. Obviously that means you need 2 synchronized rules.

1. The first rule just does Set Position. That moves the first endpoint to a new position without drawing a Trail from the previous location
2. The second rules does Set Position inside a Draw a Trail block. This draws the line from and to the new location

This is example code from my Undo Pad. The dynamic trail is drawn from (X1,Y1) to (X2,Y2) during each frame

#16

And then we add the background. But in my project I am having a complex background that cannot be constantly drawing over the whole screen

#17

Then you can’t use dynamic trails

#18

Eh. I’ll figure something out. Darn, the project will be too hard.