Multiple lines drawer problem again

Sorry I asked this previously but I’m doing same thing again but now not working seee

I’m saving line startPoint and end points in an array of length 2
when I draw both lines then only last line with index 1 draws not 0 index line

What’s wrong in events.

Both segments are from coincident lines, are you sure you are not drawing both of them? Maybe the first drawn line doesn’t start at 0;0 because the Shape Painter object (pencil) is drawing with relative positions :slight_smile:

Problem is that array is not storing it’s data of 0-index but the 1-index only actually it’s acting like a variable not an array
position of pencil object is absolute

Can you send me that file? :slight_smile:

Sure check it out
line.gdg (9.94 KB)

please ignore the previous one and consider this, simplest example:
values are not storing both text object giving 9 instead of 0 and 9.
Actually I’m asking how to make arrays in Gdevelop
simple.gdg (7.46 KB)

Because it’s pos[“0”] and pos[“1”] instead of pos[0] and pos[1].

Thanks it works…! :slight_smile: :slight_smile: :slight_smile: