How do I make a polygon dynamic?

Get help using Construct 2

Post » Tue Dec 08, 2015 5:45 pm

Hi to all. First of all Thanks for this fantastic Engine Programm. Construct2 is the best engine for a game developer!

I'm having some problem during the creation of a graph like the one in picture https://www.dropbox.com/s/80qo4kloef76q ... 1.png?dl=0 .
I have some variables x, y and I need to show if a Points is inside or outside the polygon graph. The Points 1,2 and 3 are dynamic and taked from input box. I tried canvas, polygon but the coordinates are different for cartesian and construct2 and the graph it's impossibile to show in correct way. How can I do a dynamic graph? it's possibile? I searched around the forum, but no solution! sorry for my bad English...
B
3
Posts: 3
Reputation: 206

Post » Tue Dec 08, 2015 8:51 pm

You can use a TiledBackground of 1x1 with the appropriate colour. Then just size the object to whatever size you want.
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Tue Dec 08, 2015 10:26 pm

thanks, but for me the problem is how? Resize using the x,y of construct is different thant the cartesian x,y because if y is highter the vertice is showed down instead to the top. For example vertice 1 (100,250) is higher than (100, 350) and should be the contrary.
B
3
Posts: 3
Reputation: 206

Post » Tue Dec 08, 2015 11:15 pm

Just basic math. Subtract the LayoutHeight + Self.Height from your Y, assuming your Layout is the size of your graph.
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Wed Dec 09, 2015 12:41 am

I love you!!!! :D

Is working
B
3
Posts: 3
Reputation: 206


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948, Yahoo [Bot] and 6 guests