I have point A that I want to connect and a thread appears to point B
Line appears
After connecting, there is a button to verify the correctness of the answer.
I have point A that I want to connect and a thread appears to point B
Line appears
After connecting, there is a button to verify the correctness of the answer.
What’s your question? Do you want to know how to link the two points? How to draw a line between the two? How to confirm the connection is correct? How are the two points selected - drag & drop, click some other way?
I want to know how to connect two points? And how do I draw a line between them?
That is, when I click on the first point and drag, a line appears.
Then the line is placed at the second point.
A connection will appear between the two points.
Then click the button to confirm the connection.
Please help me with a simple example.
@MrMen Does it work with GDevelop 5?
Where are the creative and genius programming and design?
HI, you can do this with the SHAPE PAINTER object.
create 2 scene vars (currentDotX and currentDotY).
create another scene var (DrawLine. it should be a boolean)
If a point is clicked on, set the 2 scene variables to the x pos and y pos of the dot clicked on.
Another event should be if mouse up, set Draw Line to false, and if mouse down, set draw line to true.
Then using another event sheet, If draw line is true => draw a line from currentDotX and currentDotY, toward CursorX and CursorY.
BE SURE TO SET “clear rendered image between each frame” to true when creating the shape painter object, in its properties…
@dskyle7
I’m not proficient in this program. It’s difficult.
Here’s a simple example of what you said.
Ok, should I send a screenshot of it
@dskyle7 Thank you for your kind reply.
Hi, This took my time to create , but im just going to show you.
First Prepare a scene like this
Then create these scene variables
Then add this first
Followed by this
Then it should work.
Thank you so much, genius. I wish you a happy new year always.