Work with instances

Get help using Construct 2

Post » Wed Nov 07, 2012 9:46 pm

I have noticed that in construct I cannot really tell how the event system work with multiple instances of the same object. I want to create multiple points and then draw a spline path between them using the spline path plugin, however, when I add a position of a point how does construct know which point if there are multiple instances. Say I've created 10 objects called Point, and I want to use their X and Y positions separately, so I use Point.X and Point.Y, but this errors and I assume it's because there are multiple Points, so there is no definite answer to the query Point.Y. Can this be resolved?
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 433
Reputation: 3,444

Post » Wed Nov 07, 2012 10:03 pm

I can't give you a definite answer cos of no cap or screenshot..

but 'For each' is generally what solves a lot of these problems.

You might wanna read up the pages about how events/picking instances work in the manual too.keepee2012-11-07 22:03:29
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Thu Nov 08, 2012 12:14 am

Each instance has a Instance ID and a Unique ID.

so can query a specific instance that way.

https://www.scirra.com/manual/30/instances
B
73
S
33
G
11
Posts: 933
Reputation: 13,795


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], Held, Silviu and 10 guests