How do I store an instance in a variable?

Get help using Construct 2

Post » Mon Jul 28, 2014 6:55 pm

FYI
That I can have an index on instances can help me. I did not know that before.

You can add a 0-based object index to get expressions from different object instances. For example Sprite(0).X gets the first Sprite instance's X position, and Sprite(1).X gets the second instance's X position. For more information see index IDs (IIDs) in common features. You can also pass another expression for the index. Negative numbers start from the opposite end, so Sprite(-1).X gets the last Sprite's X position.


https://www.scirra.com/manual/78/expressions
B
4
S
1
Posts: 8
Reputation: 286

Post » Sun Aug 03, 2014 2:06 am

I've found it useful to use the IID occasionally but I forgot you could index sprites like that. Thanks for the reminder.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests