How do I show four of the same objects, different animation?

Get help using Construct 2

Post » Tue Nov 25, 2014 7:18 am

I am close, I think, but I just can't figure this out. :|
I have four of the same "ColorBar" objects on the screen. This object has four animation frames.
I want each "ColorBar" object to show a different animation frame.
Thank you!

My incorrect code:
code.gif
You do not have the required permissions to view the files attached to this post.
B
7
S
2
Posts: 34
Reputation: 670

Post » Tue Nov 25, 2014 8:33 am

Hi, see if this helps.
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Nov 25, 2014 3:33 pm

codah wrote:Hi, see if this helps.


Hi, codah. Your example worked perfectly. I didn't know how to make an array like this. Thank you for taking the time to do this.
B
7
S
2
Posts: 34
Reputation: 670

Post » Tue Nov 25, 2014 9:03 pm

No problem. You wanted to select a different 'non repeating' random number for the animation frame whereas your code was just choosing from 0-3 each time and so could repeat. With mine you have a list of numbers that it chooses randomly from, and that chosen number then gets removed from the pool of available numbers for next time. Not sure what the While loop was for in your code, and choosing numbers twice... so I didn't go into that much :) The other thing is you can just set animation speed to 0 so you don't have to 'stop animation'.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: jojomickymack and 31 guests