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

For questions about using Classic.

Post » Fri Oct 08, 2010 8:48 am

THIS PROBLEM IS SOLVED, PLEASE DO NOT POST TO HELP ME, UNLESS YOU HAVE ANYTHING TO ADD

[u:2nwqrrr1]Original Thread[/u:2nwqrrr1]

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 :D Thanks
B
1
G
2
Posts: 6
Reputation: 637

Post » Fri Oct 08, 2010 11:23 am

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.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Fri Oct 08, 2010 12:37 pm

[quote="newt":3idt9b03]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.[/quote:3idt9b03]Thanks, 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.
B
1
G
2
Posts: 6
Reputation: 637


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests