Link object instances together

Get help using Construct 2

Post » Sun Jan 19, 2014 9:40 am

Hey guys ! :) New face here nice to meet you !

There is something i am still having trouble with construct 2, it's understanding how to link objects instances together.

My problem is : i have a character which use the pathfinding behavior.

I do stock X&Y positions into an array to save a sequence of multiple move orders which will be executed later.



But how do you do to make an unique array linked to a single character instance ? So far whatever i do modify all the array object instances.


Maybe not very clear, but thanks a lot guys if you have a solution
B
5
S
1
Posts: 4
Reputation: 733

Post » Sun Jan 19, 2014 11:30 am

Maybe using a container?

https://www.scirra.com/manual/150/containers

-Select your character instance object.
-At the properties bar, under "Container" click create...
-Select the array object to be linked to the character instance object.
-Set the selected array "Global" to "No"

In this case, everytime a character instance is create, a unique array is also being created and tagged to the instance. To get/use the array of the particular instance, just pick the character instance and you can access the array straight(you don't have to pick the array separately).
B
17
S
8
G
4
Posts: 93
Reputation: 3,190


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot], yiuyiu6666 and 12 guests