get All instances from a Family

For developers using the Construct 2 Javascript SDK

Post » Wed Jun 21, 2017 11:25 pm

Hi, how do i can get all objects from a family, for example:

Code: Select all
function myPluginFunction(){
    family.Y = family.Y++;
}


Actually I need get X and Y for each instance from a family and put them in a array, can anyone help me?

regards.
B
30
S
10
G
1
Posts: 41
Reputation: 2,471

Post » Thu Jun 22, 2017 8:37 am

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Thu Jun 22, 2017 9:25 am

99Instances2Go wrote:https://www.dropbox.com/s/y1is3vuqolficn2/XYinAnArray.capx?dl=0


Hi, Thanks,

but i need do that in the background, that's why i need to make a plugin, but i don't know how to get values from a family or behavior programmatically. (Javascript SDK)

For example, get X for each solid objects.


(Im gonna make a json with that values, and i want to make it easy for users)
B
30
S
10
G
1
Posts: 41
Reputation: 2,471


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 2 guests