Drawline?

This forum is currently in read-only mode.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I achieved something similar using a box and manipulating its end points and width, but there's no dedicated line function?

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)