# Draw a Line between two sprites

**URL:** <https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381>\
**Category:** Questions about Thunkable X\
**Tags:** tcanvas\
**Created:** [December 11, 2019, 6:45am UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381 "2019-12-11T06:45:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chanda\_Simfukwe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chanda_simfukwe/32/32125_2.png) [@Chanda\_Simfukwe](https://community.thunkable.com/u/Chanda_Simfukwe)\
**Post date:** [December 11, 2019, 6:45am UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/1 "2019-12-11T06:45:14Z")

</div>

Any method I can use to draw a **line** between two **sprites** located on different points? in **Thunkable X canvas**.  
Thanks

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [December 11, 2019, 12:04pm UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/2 "2019-12-11T12:04:14Z")

</div>

Not at the moment @Chanda_Simfukwe

Our goal goal for the initial release was to offer comprehensive control over sprites and how they interact with one another.

In the next update we will be adding addition feature, such as the ability to draw lines.

Can you tell us a little more about the type of app/game that you are trying to build?

Thanks!

---

<div class="post-metadata">

**Author:** ![Chanda\_Simfukwe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chanda_simfukwe/32/32125_2.png) [@Chanda\_Simfukwe](https://community.thunkable.com/u/Chanda_Simfukwe)\
**Post date:** [December 11, 2019, 2:49pm UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/3 "2019-12-11T14:49:54Z")

</div>

It is a Trail Making Test app for memory test for patients with neurodegenerative diseases, I developed it already for Android OS. Now developing the iOS version, just stuck on drawing lines whenever the sprite is touched. Any other alternative i can use, the all logic is shown in the picture? Thanks.

 ![643x0w](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/c/fc595402095ebd3ce75a4b67f000e87e2886cae0.jpeg)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 11, 2019, 2:54pm UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/4 "2019-12-11T14:54:28Z")

</div>

To solve your problem, you can use Map. When you click on a marker, connect the line markers by drawing polylines. See example [Polipaint](https://x.thunkable.com/projects/5db56632a1e1fcefd3932db7/project/properties/designer/) and  
[Map canvas](https://x.thunkable.com/projects/5db56eadb7c037443fadb222/project/properties/designer/)

Best regards, Alex  
[ACtech demo project](https://x.thunkable.com/projects/5d70f93f8a62b4079eedaff2/project/properties/designer/)  
[Thunkable X Basic Programming Course](http://droidscript.ru/main/title_ds15.php)  
[Block Reference](http://droidscript.ru/main/statyi/thunkableios_blockhelper.php)  
[Component Reference](http://droidscript.ru/main/statyi/thunkableios_objects.php)  
[Bug tracker](https://x.thunkable.com/projects/5dbd5243a77acad1b26f851f/project/properties/designer/)  
[Polipaint](https://x.thunkable.com/projects/5db56632a1e1fcefd3932db7/project/properties/designer/)  
[Map canvas](https://x.thunkable.com/projects/5db56eadb7c037443fadb222/project/properties/designer/)  
[Method Inspector](https://x.thunkable.com/projects/5d9310fcdf0a8f208bd2bb11/openProject/designer)  
[Performance](https://x.thunkable.com/projects/5db93ebab8e0fc9c685b3477/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![Chanda\_Simfukwe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chanda_simfukwe/32/32125_2.png) [@Chanda\_Simfukwe](https://community.thunkable.com/u/Chanda_Simfukwe)\
**Post date:** [December 11, 2019, 3:00pm UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/5 "2019-12-11T15:00:03Z")

</div>

Thanks, let me work on it. In case of any problem. I will write in the forum.

---

<div class="post-metadata">

**Author:** ![Chanda\_Steven](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chanda_steven/32/45566_2.png) [@Chanda\_Steven](https://community.thunkable.com/u/Chanda_Steven)\
**Post date:** [December 12, 2019, 2:40am UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/6 "2019-12-12T02:40:59Z")

</div>

Mistake

---

<div class="post-metadata">

**Author:** ![Chanda\_Simfukwe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chanda_simfukwe/32/32125_2.png) [@Chanda\_Simfukwe](https://community.thunkable.com/u/Chanda_Simfukwe)\
**Post date:** [December 12, 2019, 2:43am UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/7 "2019-12-12T02:43:31Z")

</div>

It was a great idea you suggested but the problem is, I can not **edit the markers**. Where I can put my own **icon in markers** and also the **background** for the **google map** can not be edited where I just put a **blank screen** with a **white background** and put **markers** at different points and **connect them at every point** reference from the picture attached. If there is any other alternative please advise, Thanks. @domhnallohanlon

Simplified : **Numbers** are **Markers with icons** and the **Background** is the **Map blank** When one of the **markers** is **clicked** or **touched** it draws a line connecting to the second **marker** in **sequential order**.

 ![643x0w](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/c/fc595402095ebd3ce75a4b67f000e87e2886cae0.jpeg)

Thanks

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 12, 2019, 9:47am UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/8 "2019-12-12T09:47:35Z")

</div>

1. In Google Map, you can put numbers on markers, and create your own markers, display text, but this is not implemented in Thukable X.

2. The coordinate system of Canvas and the screen do not match. For this reason, it is not possible to use components to display numbers.

3. HTML and Javascript are not supported in applications installed on iOS and for this reason it is impossible to use web-technologies

What can you do? Create your own markers on the Map and program to display vector numbers inside these markers. This is a very difficult task.

Another way is to place buttons with absolute coordinates on the screen and insert rectangles with a diagonal line between them. This is also a difficult task, but simpler than the previous option.

---

<div class="post-metadata">

**Author:** ![Chanda\_Simfukwe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chanda_simfukwe/32/32125_2.png) [@Chanda\_Simfukwe](https://community.thunkable.com/u/Chanda_Simfukwe)\
**Post date:** [December 12, 2019, 2:18pm UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/9 "2019-12-12T14:18:24Z")

</div>

Thanks, I understand. I thought of something. If i use one of the sprites on the Canvas with a line as the sprite image and press it between two sprites, Whenever you press one of the sprites then the image in the sprite with a line should appear but how do i set a sprite visible to false whenever the screen opens?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [December 12, 2019, 2:21pm UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/10 "2019-12-12T14:21:00Z")

</div>

The sprite visibility can be set using blocks. See docs.

---

<div class="post-metadata">

**Author:** ![Chanda\_Simfukwe](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/chanda_simfukwe/32/32125_2.png) [@Chanda\_Simfukwe](https://community.thunkable.com/u/Chanda_Simfukwe)\
**Post date:** [December 12, 2019, 2:30pm UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/11 "2019-12-12T14:30:53Z")

</div>

Thanks, let me work through then.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:46am UTC](https://community.thunkable.com/t/draw-a-line-between-two-sprites/361381/12 "2024-11-08T11:46:23Z")

</div>


