Evaluating drawn objects in Construct 2

Get help using Construct 2

Post » Thu Nov 28, 2013 3:08 am

Hi guys. This is my first time posting on here. I'm trying to make a game that's best described as an action packed Lemmings crossed with Crayon Physics Deluxe (I've literally just started, there's only one line of code in the event sheet and one sprite with the Platform behavior).

So far I've managed to get the shape drawing functionality down where you draw something on the screen and it disappears. What I want to do now is have that shape that's drawn be evaluated, then spawn a platform or object based on the dimensions of that shape.

I have no idea where to begin with implementing that.

I don't even know how to attach the .capx file here, I don't see anything for it.


...I don't know anything... :(
B
3
Posts: 4
Reputation: 238

Post » Thu Nov 28, 2013 11:03 am

What kind of logic did you set up to be able to draw shapes?
B
45
S
15
G
73
Posts: 2,019
Reputation: 43,420

Post » Thu Nov 28, 2013 11:41 am

What kind of objects would you want to create?

if it's a straight object like a platform, you could probably just use the start and endpoint of drawing to create the object from start untill endpoint.
If the object needs to be tilted in the direction you can use set angle towards endpoint.

If you want to create more complex objects you'd need to have some kind of shape recognition, this will be harder to achieve, but I've seen a third party plugin that does just that. LittleStain2013-11-28 11:42:02
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Nov 29, 2013 3:30 am

Touch -> Is in touch -> System -> Create object -> [object] on layer 0 at (touch.X, touch.Y)

**NOTE**
Can someone just go ahead and delete this post? It was made in error.H3ArTl3sSGunN3r2013-11-29 03:32:36
B
3
Posts: 4
Reputation: 238

Post » Fri Nov 29, 2013 3:31 am

[[email protected]] What kind of logic did you set up to be able to draw shapes?[/QUOTE]

Touch -> Is in touch -> System -> Create object -> [object] on layer 0 at (touch.X, touch.Y)H3ArTl3sSGunN3r2013-11-29 03:33:40
B
3
Posts: 4
Reputation: 238

Post » Fri Nov 29, 2013 4:11 am

[QUOTE=LittleStain] What kind of objects would you want to create?

if it's a straight object like a platform, you could probably just use the start and endpoint of drawing to create the object from start untill endpoint.
If the object needs to be tilted in the direction you can use set angle towards endpoint.

If you want to create more complex objects you'd need to have some kind of shape recognition, this will be harder to achieve, but I've seen a third party plugin that does just that. [/QUOTE]

@LittleStain

I want to create platforms of various types that a (pathfinding?) sprite can use to get to the end of a level. The player will draw with their finger (or a mouse for those playing without a touchscreen) the outline of whatever types of platforms they have at their disposal (they will unlock different types of platforms as they progress). The player touches a "drawing" icon in the top left corner to activate "drawing mode."

I have the drawing mode functionality working, and the drawing functionality itself. It doesn't do anything yet though. What I want is for platforms to be drawn where the player draws the outline. Picture Crayon Physics Deluxe, but with the drawn objects staying in the position they are drawn at.
B
3
Posts: 4
Reputation: 238


Return to How do I....?

Who is online

Users browsing this forum: bluesun66, plinkie and 11 guests