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
22
S
9
G
4
Posts: 476
Reputation: 4,327

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
32
S
12
G
27
Posts: 761
Reputation: 17,246

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
22
S
9
G
4
Posts: 476
Reputation: 4,327


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 33 guests