What parameters does an object take?

Get help using Construct 2

Post » Sat Oct 11, 2014 5:14 pm

I recently discovered that objects take parameters, but the little help window doesn't pop up when the open parenthesis is typed indicating what parameters it takes. My forum search fu and my manual search fu haven't found anything.

For example, what parameter goes here?: Sprite(???).X
B
51
S
13
G
8
Posts: 194
Reputation: 7,311

Post » Sat Oct 11, 2014 5:32 pm

It lets you specify a zero-based index ID. So, for example, if you have two Sprite objects, Sprite(0).X returns the X position of the first Sprite and Sprite(1).X returns the X position of the second.

See IndexIDs in the manual, then look at Object Expressions on the Expressions page.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,106

Post » Sat Oct 11, 2014 5:36 pm

Thanks linkman! That makes sense.
B
51
S
13
G
8
Posts: 194
Reputation: 7,311


Return to How do I....?

Who is online

Users browsing this forum: DrKoala, plinkie and 10 guests