How Do I Control Different Instances of One Sprite

Get help using Construct 2

Post » Sat Feb 22, 2014 10:41 am

As the topic says. I am trying to set each flag a different animation based on if the level has been completed or not. How do I control each instance of the flag? Please don't tell me I need to make 6 different flag sprites :/
Image
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Sat Feb 22, 2014 10:59 am

something like (not the best animation)

https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/flag%20test.capx

edit updated with better flags :)

edit 2 File size reduce a bit
Last edited by RamPackWobble on Sat Feb 22, 2014 12:15 pm, edited 1 time in total.
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sat Feb 22, 2014 11:28 am

Thank for the huge download, lol.

Unfortunately, with mouse clicks you can control which instance simply by which one was clicked. I need some other way to reference each individual one on its own. Like some sort of UID? I don't know.
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Sat Feb 22, 2014 11:52 am

You can add a dedicated instance var for it.
Give each flag a unique number in their var.

famflag.flagnumber

Event
Pick by evaluate famflag : famflag.flagnumber = 1
action
do something to famflag which has flagnumber 1
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,567


Return to How do I....?

Who is online

Users browsing this forum: zenox98 and 13 guests