How do I find a family objects x/y position using UID

Get help using Construct 2

Post » Tue Jul 12, 2016 9:52 pm

Hey Everyone,

Can someone advise me of how I can get the x/y position of an object that is contained within a family.

I am currently using the pick nearest event to select the closest family member to the player character and then setting a variable with the UID of that object, which works fine.

I then want to get the x/y position of that object using the UID, something like:

variableX =enemy(UID).X
variableY =enemy(UID).Y

Any help with this will be appreciated.

Cheers.
B
8
S
2
Posts: 7
Reputation: 525

Post » Tue Jul 12, 2016 10:49 pm

Do Enemy.Pick by UID first.
ImageImageImage
B
71
S
22
G
257
Posts: 3,790
Reputation: 142,696

Post » Tue Jul 12, 2016 11:19 pm

Hi blackhornet,

It looks like it's working now.

Thank you for your quick response! :)
B
8
S
2
Posts: 7
Reputation: 525


Return to How do I....?

Who is online

Users browsing this forum: lemonizer and 0 guests