How can I get the coordinates of object by IID

Get help using Construct 2

Post » Tue May 02, 2017 4:20 pm

Hi,

I need an object xy coordinates, but I have to get them by use IIDs. For example how I can find a path to a tree which have IID 6... (find path to tree.iid6.x and .y) I couldn't find out how i should to do that. Thanks for any idea.
B
5
S
1
Posts: 37
Reputation: 441

Post » Tue May 02, 2017 4:34 pm

tree(6).x, tree(6).y

Although this only works when ALL trees are picked. IID is an ordered index of picked instances. If you only have one tree picked by another condition, there wont be a "sixth" in your picked instances.

Otherwise, you can use the system condition "pick nth instance" = 6, then just use tree.x, tree.y
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests