Dotted Line Math Question

vikingviking Member, PRO Posts: 322

I would like to draw a dotted line on a map between two actors. Actor 1 on is located at X1,Y1 and Actor 2 is located at X2,Y2. Is there an elegant way to draw a line of dots from Actor 1 to Actor 2? And then from Actor 2 to Actor 3, which is located at X3,Y3? And so on and so forth.

One more thing to add.. The distance between the actors is never the same, so the number of dots will vary, but the distance between each dot should always be the same.

Best Answers

  • HopscotchHopscotch Posts: 2,782
    edited October 2016 Accepted Answer

    @viking

    a dotted image, set to tile, and some maths. Project attached

    Btw, I used a 0 timer, in stead of constrains, for readability.

  • MentalDonkeyGamesMentalDonkeyGames Posts: 1,276
    edited October 2016 Accepted Answer

    @Hopscotch said:
    @viking

    a dotted image, set to tile, and some maths. Project attached

    Nice!

    Here´s my version that uses the Replicate behaviour instead of resizing the actor.

    (I rudely drag'n dropped a few behaviours from your project :smiley: )

Answers

Sign In or Register to comment.