How to draw a line between 2 points

I want to have 2 points have a (preferably) editable line that i can make appear and disappear Like a

So sprite 1
And sprite 2
have a line that moves with them
like a rope connecting them that can be toggled

3 Likes

You can draw lines if you go under the advanced category, and then go to “Images”
Here’s an example:

4 Likes

Use sprite util render on screen block
If sprites exist then
Draw line from sprite1 pos to sprite 2 pos on screen
(this method allows you to adjust the z value of the line as well)

3 Likes

So i got that working how do i make it stop?

Press A to start throwing and B to Throw

4 Likes


If you change the variable to false it should just stop rendering

1 Like

Well you see i did that and it still renders

1 Like

Well somehow you’re using the dart sprite as the bool (idk why that didn’t trigger an error). To fix it use a new bool variable and make sure to toggle it at the right moments

1 Like

You can pass in any datatype and it is automatically converted to boolean for checking

3 Likes

Ok so now when you move the cam it doesnt move the line

after you hook you can move left right and move up down too
press B to release the hook

1 Like

I’m having the same problem with the camera, can someone help?

1 Like

Send code pls (@MakeCode can you make this a message that pops up when people ask for help?)

1 Like
3 Likes

Nice!