0 Favourites

How to use the canvas object. *self-solved*

This forum is currently in read-only mode.
  • THIS PROBLEM IS SOLVED, PLEASE DO NOT POST TO HELP ME, UNLESS YOU HAVE ANYTHING TO ADD

    Original Thread

    Hi guys,

    I'm making a prototype that involves drawing things and manipulating lines and stuff. Its kinda sandbox game, where you can draw terrain, and spawn avatars which move around. You can then dynamically add terrain(Lines) and manipulate these avatars.

    To do such a thing I need to draw lines but I have no idea how. I tried using separate sprites and try to make a illusion of a line but it spawns too many objects and it gets complicated.

    Then I found the canvas object; It says in the description:

    An area that can be drawn to at runtime.

    What does this mean? How can I use it? Does this even draw lines?

    If someone could help me answer these questions or otherwise post an example .cap, it would be of great help.

    Status: Online

    Additional Questions(Unrelated to the above topic)

    1.What does Get mouse absolute x and y mean?

    EDIT: I managed to figure out a couple of stuff myself, but I'm still not sure how I'm gonna make a solid line.

    ---------------------------------------------------------------------------------------------------------------

    FINAL EDIT: I managed to figure it all out myself! I found the right line for my prototype and I'll be ramping up work on it ASAP Thanks

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You might want to add the object and experiment.

    Yes it can do all your asking, but if you add the object and take a look at the possible events, it should become pretty evident.

  • You might want to add the object and experiment.

    Yes it can do all your asking, but if you add the object and take a look at the possible events, it should become pretty evident.

    hanks, I played around with the events and I managed to draw lines from two points. The thing is, I don't know how to make the lines actually follow the mouse when clicked. And I still don't know how the thing works and the other functions it has.

    EDIT: I managed to make lines by using the Draw Point action but their really small and I don't know how to make them bigger. I also think that they won't be that functional in my prototype.

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