action affects copied sprites problem.

Get help using Construct 2

Post » Wed Apr 19, 2017 11:44 am

i have 1 sprite and copied it 10 times in the layout. for example imagine 10 copied squares. now i touch 3 squares and these 3 squares change animation to a smaller square. everything is okay here. the animation affects only the squares i touched but later when an fuction is enabled. i want these 3 squares i touched to change animation. here is the problem. all other copied dots gets the animation after function. any solution ?
B
6
S
3
Posts: 40
Reputation: 698

Post » Wed Apr 19, 2017 5:04 pm

Maybe this would work:

On function "changedTouched"
>>Square is playing animation "small": Action: Square play animation "newanimation"

Do you have a capx you can share?
B
20
S
8
G
3
Posts: 458
Reputation: 4,055

Post » Wed Apr 19, 2017 5:35 pm

Create Square instance variable: IS_TOUCHED = 0

On Square is Touched | set Square.IS_TOUCHED = 1

On Function
Square.IS_TOUCHED = 1 | [Your action]
Image Image Image
B
31
S
11
G
27
Posts: 748
Reputation: 17,093

Post » Thu Apr 20, 2017 11:22 am

Thank you so much. both of you
B
6
S
3
Posts: 40
Reputation: 698

Post » Thu Apr 20, 2017 4:02 pm

You're welcome :)
B
20
S
8
G
3
Posts: 458
Reputation: 4,055


Return to How do I....?

Who is online

Users browsing this forum: Microbex, totoe and 17 guests