How do I assign instance variable by animation frame?

Get help using Construct 2

Post » Mon Sep 21, 2015 1:14 am

I have an object with 30 animation frames and also an instance variable IsPicked:False.

So when the object with animation frame 4 collided with wall, set IsPicked:True to that animation frame only. All other animation frames remain as IsPicked:False.

Is it possible to assign instance variable to that particular animation frame only?
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Mon Sep 21, 2015 2:03 am

If I understood correctly ... you need ..something like this:

FrameVariable.capx
B
66
S
24
G
7
Posts: 1,515
Reputation: 11,041

Post » Mon Sep 21, 2015 2:13 am

@korbaach

Exactly what I need! Thanks. Do you know the way to set the animation frame to the one that IsPicked:True after 1 round? Say the first round from 0 - 9 I picked 2, 5, 7, 8 so the second round the number will only show 2, 5, 7, 8 instead of going from 0 - 9. Hope that makes sense.
B
23
S
10
G
2
Posts: 104
Reputation: 3,071

Post » Mon Sep 21, 2015 6:33 am

B
66
S
24
G
7
Posts: 1,515
Reputation: 11,041

Post » Mon Sep 21, 2015 7:09 am

@korbaach

That saved my day. Thanks again!
B
23
S
10
G
2
Posts: 104
Reputation: 3,071


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests