Timeline limitations

0 favourites
  • 13 posts
From the Asset Store
Check preview, download and add value to your games.
  • As an animator I have to say that I am quite impressed with Timeline capabilities. I am seeing a great potential of using this feature instead of tweening for some movements.

    However I have some questions.

    - Can timeline animation be used on objects with applied physics (for an example during some physics force to activate animation on that same object)

    - Can I transpose animation keyframes (relative position) on another object ?

    - If there are many instances of same object can I apply animation on all of them, with touch control for an example?

  • I'll answer in order.

    1) Animations that change numeric values (this includes X and Y properties) are relative by default. So they should work with other behaviours affecting the same instance. Relative timelines apply their changes incrementally, so if there are external objects making changes on the same instance, all of the changes will be joint together.

    This will result in the timeline ending in unexpected positions.

    2) I am not too familiar with animation lingo, but if what you mean by transpose is to use the animation designed in the editor with another instance at runtime, it can be done. You need to use the Set Instance action, which allows you to set the instances that the next timeline you play will use. A more detailed description on it can be found in the manual. C3 has a built in example that uses the action, just search for "timeline" in the Start page.

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/timeline

    3) This would also be solved with the Set Instance action. Right before playing a timeline, use the action and when the timeline starts playing it will do so with the specified instance(s) instead of the ones used in the editor. When you use Set Instance C3 is creating a unique timeline for all the specified instances so all of them will have their unique state.

    If you need to further control these kind of timelines at runtime, you need to remember to use a Tag when playing, then use that to target the timeline that you need to control.

    Hope that is helpful.

  • Thank you DiegoM for such a clear explanation. I played around with those options and they are working fantastic! I am really amazed.

    In your opinion, is there any reason to use Tween behavior over Timeline?

  • Under the hood a Tween is a Timeline, as in they use the same code. The Tween behaviour was a nice by-product of developing the Timeline feature. At the time of it's development, a lot of users had been requesting a built in Tween behaviour for Construct for a while, the Timeline feature was not quite ready yet, but it was good enough to re-purpose it's internals, and thus the Tween Behaviour came to be :P

    If you think about it, there is only one thing which is unique to Tweens, and that is the Value Tween. You could do something similar by animating an instance variable in a Timeline, it's just not as obvious. Maybe in the future Timelines will support using a value property track, it is not high priority though.

    To sum it up, Tweens are limited Timelines, anything you can do with a Tween can be done with a Timeline. They offer less functionality, but in exchange are easier to use. Sometimes you just want to get something done quickly, and a tween will get the job done most of the time. If you find that tween's are not quite making the cut though, then you might want to try Timelines.

  • Haha, that's a nice story how Tweening behaviour was born :)

    I will definitely stick to timelines, one of my fav features in C3

  • Hi guys,

    Speaking of Timeline limitations, it seems like they are limited to the specific layout they are created in.

    Am I right?

    For example, I would like to edit timelines in a dedicated layout and use them everywhere else

    in my project with the "set instance" action.

    Is it possible?

  • Abwuds

    That is correct.

    If you just play a timeline, Construct assumes you want to play the timeline that was created in the editor. This means it will only work with the specific instance that was used in the editor to create the animation.

    When you use Set Instance what you are doing is replace the instance/s used in the editor, with something else, that means the animation can be used elsewhere.

    It's a rather important action, maybe it should be highlighted.

  • Haha I'm so ashamed

    I tried in an empty project and actually, my timeline had all its properties disabled x)

    Thanks a lot!

  • Diego I'm dynamically creating a sprite to be used in a Timeline. I used the "tag" and Set instance, however the sprite does the timeline animation but from a location about 32 pixels to the left of where it spawns? always. I don't know to make it start in the correct location. Any idea what I am doing wrong? The whole timeline animation is moved over to this strange starting location.

  • jobel

    Have you checked the values held in the first X and Y keyframes? You can do so by clicking on the keyframes in the timeline bar and then checking the properties bar. If those values are not 0, when the timeline starts playing, the affected instance will have a slight offset.

    I am guessing you must have changed the initial keyframe with the layout view controls to adjust the starting position of the animation. Normally this works properly for all keyframes, the first one has a little gotcha if the timeline is using relative positioning though.

    Because the values held are relative, by default the first X and Y keyframes have a value of 0, which just means "the initial position at the moment of playing". This allows for the animation to be played starting from the position of the instance, rather than a fixed value. If they change to something different to 0, then the animation will start from the instances position plus that offset.

    Of course, this is all technical mumbo jumbo and you really shouldn't be thinking about it. I have been meaning to fix this for a while because although it is not a bug, it is a very awkward behaviour which really isn't very helpful.

    Hope that helps.

  • DiegoM ah yes, I changed the position of the first keyframe, that fixed it. But now I did something and it won't run at all when run the game - but it does run in the Timeline editor!

    see here: dropbox.com/s/b811j45yhpn6trq/timelineTests.c3p

    Yeah its a bit awkward knowing what to move when. I like how the properties fields turn yellow showing you are "affecting" keyframes.

    I still haven't figure out how to make an object with Create/Spawn Object and set it to the position of the beginning of the Timeline, then have the Timeline animate it. right now I am just guessing.

    Another awkward thing is how you sometimes start to edit a Timeline and the object shows to be somewhere in the middle of its animation, but you can't forward or step through the animation, its just stuck there, placing the red bar does nothing. I would expect it to show where it is in the timeline as you move the red line.

    One other strange thing... (sorry!) is how the first keyframe is only a half circle... very hard to hit with the mouse!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I found a couple of things with that project of yours.

    1) The track for the instance was disabled, that means it wouldn't do anything at runtime. You can see if a track is disabled by either clicking on it and checking the properties bar or by looking at it's corresponding check box in the timeline bar. You know all the check boxes to the left most of the bar? They are from left to right Visibility, Locked, Enabled, Show UI Controls.

    You can read more about those in the manual entry https://www.construct.net/en/make-games/manuals/construct-3/interface/bars/timeline-bar

    2) You almost got everything right with the Set Instance action, but you missed setting the track id property.

    You can view the track id property by clicking on the track in the timeline bar and checking the properties bar. That value has to match the one you use in the Set Instance action.

    The manual has more information on the action https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/timeline

  • DiegoM that works! I found tutorials on basic usage but not so much on using it dynamically, so thanks so much for that!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)