How do I attach an array or dictionary as an instance var?

Get help using Construct 2

Post » Fri Oct 03, 2014 5:15 pm

Is this possible?

So, for example, what if I wanted each created "MySprite" to have a defaulted set of values in its own array instance? is this possible? Can These things maybe be put into the "container" functionality?

Thanks!
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
14
S
4
Posts: 303
Reputation: 1,730

Post » Fri Oct 03, 2014 5:45 pm

Using a Container is the usual way to do this.
ImageImageImage
B
71
S
21
G
230
Posts: 3,687
Reputation: 128,845

Post » Fri Oct 03, 2014 5:53 pm

Follow up, sorry I'm not at a pc with c2 currently,

How do I "pick" the dictionary object? If I have only the target instance picked, will C2 be able to figure out that the dictionary I'm referencing is the one contained in the picked sprite?
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
14
S
4
Posts: 303
Reputation: 1,730

Post » Fri Oct 03, 2014 6:13 pm

Yes, and that is most of the magic that comes with the containers functionality ! :)
Last edited by Magistross on Fri Oct 03, 2014 7:53 pm, edited 1 time in total.
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Fri Oct 03, 2014 7:36 pm

Very cool! Thanks all!
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
14
S
4
Posts: 303
Reputation: 1,730


Return to How do I....?

Who is online

Users browsing this forum: David181, Shenkai the ssj and 23 guests