IsThere a way to dealwith objects by variable name

Get help using Construct 2

Post » Tue Jan 08, 2013 5:03 am

like push a group of items(p0,p1,p2,p3) into an array.
Now I can only add them one by one like
'push back p0.uid on xais'
'push back p1.uid on xais'
'push back p2.uid on xais'

We know the for expression wont work for a instance name.
So I have no idea to deal with how to get a dyamic instance name.
we know,the expression like ("p"+0).uid is just Syntax error.
But other language like as3 could use this["p"+0].
That will be great convenient.

atfield2013-01-08 05:07:32
B
4
Posts: 15
Reputation: 355

Post » Tue Jan 08, 2013 2:35 pm

Would you be looking for something like:

for each p
       push_back p.uid on x-axis
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Wed Jan 09, 2013 1:22 am

[QUOTE=vee41] Would you be looking for something like:

for each p
       push_back p.uid on x-axis
[/QUOTE]

the p you mean is a family or what?
the p.uid can be its children?
B
4
Posts: 15
Reputation: 355


Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 21 guests