How to get X and Y UID coordinates?

Get help using Construct 2

Post » Wed Feb 12, 2014 12:46 pm

I have a sprite which act as spawn point.
I duplicated it that I have many instances of this object on the stage.

Now every X seconds I want an object that spawns at the the different positions of the spawn point instances.

How do a get the UID X and Y coordinate of my spawn point?

I know it should look something like this:

System / when spawn variable = 1 / create object at (SPAWN_POINT UID number and X coordinate, SPAWN_POINT UID number and Y coordinate)

but I have no idea what is the right expression...
B
5
Posts: 40
Reputation: 307

Post » Wed Feb 12, 2014 1:18 pm

Guys I am not mother tongue, i noticed that what I wrote up here is a bit messed up.

Anyway to make it simple:

this expression get the X coordinate of the IID of an object:
Sprite(1).X

what's the equivalent expression to get the X coordinate of the UID of an object?

here's the link where I found the IID expression, but I couldn't found the UID equivalent
https://www.scirra.com/manual/78/expressions
B
5
Posts: 40
Reputation: 307

Post » Wed Feb 12, 2014 1:41 pm

First, you should use the 'pick by UID' condition, then just use Sprite.X.

So,

Sprite -> Pick by UID
       -> Sprite.X

B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Wed Feb 12, 2014 1:43 pm

[QUOTE=Joskin] First, you should use the 'pick by UID' condition, then just use Sprite.X.

So,

Sprite -> Pick by UID
       -> Sprite.X

[/QUOTE]

Just beat me to it. Exactly what "Joskin" said.Xerullian2014-02-12 13:43:47
"In truth we live, In Truth we die"
B
11
S
3
G
4
Posts: 22
Reputation: 3,177

Post » Wed Feb 12, 2014 2:59 pm

thank you so much!!!
B
5
Posts: 40
Reputation: 307


Return to How do I....?

Who is online

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