Drawline?

New releases and general discussions.

Post » Thu Dec 20, 2007 5:36 am

I want to fire a chain off from the player, right now the end is using a bullet object, but how do I connect the two sprites with a line? I don't see a function for this at the moment, I could be overlooking it however.
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Thu Dec 20, 2007 6:16 am

I achieved something similar using a box and manipulating its end points and width, but there's no dedicated line function?
B
5
S
2
G
5
Posts: 221
Reputation: 2,272

Post » Thu Dec 20, 2007 7:10 am

Not yet, at least not on the layout itself. You can draw a line on the Canvas object, though.

Edit:
Hmm, found a weird bug:

When choosing a line color to draw in the action, it won't remember expressions. I can type in an expression (like 157 or random(255255255.0)) and when I go back into the action to edit it, it's reverted to the "Default" color picker, and the chosen color is black.

Also, check out this example:

http://www.mediafire.com/?czylsyw3txt

It's supposed to draw a line of random color from 0,0 to Sprite.X, Sprite.Y (controlled by the mouse. For some reason it wouldn't draw to MouseX, MouseY.) Instead of a random color, though, it draws only black... unless you move the mouse outside of the window. Then you see it flashing to random colors.

Another thing, if you turn of "Grab Frame" and move the mouse outside of the window, the line still stays black, but "fades out" as it gets toward the edge of the window.

Bug submitted to SourceForge
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 5 guests