Moving one instance relative to another?

Get help using Construct 2

Post » Fri Oct 04, 2013 12:39 am

TL;DR: How do I set the position of an object in relation to another instance of the same object, how do I distinguish them in the action?

In my game, the player character is composed by several objects. Some of them look identical but behave differently. Right now, each part of the character is an individual object, but some of these object share identical sprites, and it would be better to make them all just different instances of the same object.

For example, right now the body's X coordinate is calculated like this:

Body1.X = (Body2.X + Back.X)/2-10

Where Body1 and Body2 are instances of the same object. Should I just keep it as separate objects with the same sprite or is there another way?
Posts: 53
Reputation: 787

Post » Fri Oct 04, 2013 11:31 am

Have you tried the Pin behavior? when it comes to positioning, it's very handy (pretty much removing the need to worry about any positioning at all). You just position your sprite in the layout view, pin them, and there you go.
Posts: 132
Reputation: 2,627

Return to How do I....?

Who is online

Users browsing this forum: Armench, Artcadev, farsen, newt and 14 guests