Loop or repeat an animation x number times/stop?

Get help using Construct 2

Post » Mon Jul 08, 2013 7:02 pm

Hi there,

This is a definite "newb" question. I've looked at a lot of example code and also read the manual, but I still can't figure out a simple thing in CC2. Here is what I'd like to do:

1. When the layout opens, run a two frame animation.
2. Repeat the animation X number of times.
3. Stop the animation on Frame 1 (animation has frames 0, 1)


What I've tried:
I've tried setting the animation loop in the animation editor...but that doesn't work.
I've tried setting the animation repeat count in the animation editor...but that didn't work.
I've tried using the system repeat... but that didn't work.
I've tried using a system set x ... but I couldn't find a way to do an "if X = to..."
I've tried looking at tutorials, but nothing is simplified. Do wish the manual included simple examples of the event editor usage for the events, etc. It would be great to see the event editor set up for the system reference, etc.

I've also tried to use various combinations of the above with the stop animation.

Hoping that someone will jump in to help me. I have a designer's mind and even CC2 doesn't always make sense to me.

TIA

-Rachel
B
6
S
1
Posts: 21
Reputation: 822

Post » Mon Jul 08, 2013 7:11 pm

Set the number of times you want to repeat in the animation editor's properties panel, then create an event Sprite: On animation "Default" finished -> Set animation frame to 1
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Mon Jul 08, 2013 8:25 pm

THANK YOU!! It worked.

Where, in the manual is that "Default" trick listed? I swear that I looked at everything. Must have missed it.

Really do appreciate your help. Wish I could have posted a screen capture of the event editor for this. Maybe it would have helped another person. Took me several tries to figure out what you were saying. Seeing it visually might have helped someone else, but I don't have a URL to post to.

You are great...

-Rachel




B
6
S
1
Posts: 21
Reputation: 822

Post » Mon Jul 08, 2013 10:15 pm

My pleasure.

I wouldn't call it a trick; it's simply the name of the default animation for each sprite. You can add multiple animations for any sprite, but the first one is always named "default". All this event does is test if that animation is completed.

Here's an example capx for this, for your reference and if anyone else is interested.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Mon Jul 08, 2013 11:41 pm

GeometriX,

I sure appreciate your effort. Will take a look at this once I have access to CC2 v137. I'm using the free copy. I really want to get to a point where I can see if I understand how to make something beyond "Hello World" before investing. Have to admit that of all the Authoring systems that are currently out there that I've seen, CC2 is the most beautiful. The design and colors are pleasing and I enjoy working in the program. It is just that, even though I've played around with many of these types of systems, I've never yet found one that I can use without having to delve into scripting or mathematical formulas, but with time, I'm picking up on some of the features of CC2.

Thanks again for your help. In my book, forum support, examples, and documentation are the most important factor in most of these sorts of tools. Unfortunately, documentation is usually lacking. CC2 has a lot of tutorials. I am enjoying that.

-Rachel
B
6
S
1
Posts: 21
Reputation: 822

Post » Wed Jul 10, 2013 6:26 pm

I can't seem to get this to work. Can you tell me what I am doing that is wrong? TIA

Objects are: animPosition and animPosition2
Desired outcome:
Start animPositon at beginning of layout (works).
Stop animPosition2 at start of layout (works)
Start animPosition2 (doesn't work)

The Event Editor:

System--> On Start Of Layout -- animPositon2--Stop Animation


animPosition-->On animation "animPostion"finished --animPostion2--Start animPostion2 from beginning

Can not seem to get my head around the animation events and actions. Any help would be appreciated--as always.    TIA -Rachel
B
6
S
1
Posts: 21
Reputation: 822


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests