Quick question about picking UID

Just started using Construct 2? Post your questions here

Post » Sat Mar 19, 2016 1:30 pm

If I write, let's say " Sprite(5).X " in an expression, what does the (5) do ?

I was about sure it would pick the sprite with UID 5, but everything I've done proves it doesn't.
Since construct isn't throwing a syntax error at me, I assume it does mean something else, but what?
And then, is there a way to pick an UID directly in written expressions instead of events ?
B
7
S
3
G
3
Posts: 56
Reputation: 2,240

Post » Sat Mar 19, 2016 1:33 pm

That's picking the sprite with IID=5, in other words, the 6th sprite, out of however many are currently picked. You need to use the event to pick by UID.
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Sat Mar 19, 2016 7:42 pm

It isn't the 6th sprite picked, it's the 6th sprite regardless.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests