mardoch's Recent Forum Activity

  • So, after several unsuccessful tests, including calling everything through a function, here's what I was able to determine:

    There is indeed a problem with timelines, specifically when switching from one timeline to another, whether with standalone object instances or with hierarchy. The first timeline positions the instances correctly, but as soon as you switch to a new one, the instances get shifted in position or angle.

    What I've noticed is that the problem is tied to the Relative result mode. If you switch the result mode to Absolute, the offset doesn't happen. The problem with that mode is that it breaks the links created by the hierarchy. So that property becomes unusable in Absolute mode, which is quite a problem when animating a boss made of multiple parts.

    The only way to work around this problem would probably be to stay within a single continuous timeline (untested). But this would mean building all your animations one after another on the same timeline, and switching by jumping to specific keyframe to trigger the animation you want. That's clearly not very practical, especially if you need to produce a significant number of animations. In short, it has its limits.

    What I can conclude from this is that it's a fairly problematic bug in Construct. I had never needed to use Timeline until now, but for a boss made of multiple parts, the memory savings compared to frame-by-frame animation are considerable. Unfortunately, as things stand right now, it's completely unusable because of this issue.

    I really hope this can get fixed in a future version, because it's a real shame to have to pass entirely on this feature.

  • Hi DiegoM,

    Thanks for your explanation. I tried your suggestion of pausing/resuming, but I didn't go into enough detail in my first message to explain the problem properly, my mistake.

    I actually have multiple timeline for my character (a boss) like appear, idle, crush, attack A, attack B, death, etc…

    It seemed easier for me that way as I want its actions to be randomized. So when I switch to another timeline, the offset happens. It happens exactly once I load a timeline for the first time. Once that first switch happens, the offset stays stable if I go back to a previous timeline that's already been played.

    I changed a bit my example: dropbox.com/scl/fi/v73ffcvmnzlexpym6o08g/TimelineHierarchyLegsTest.c3p

    I also tried several things but it didn't fix anything:

    • Stop all (I expected this to reset to the initial editor state per the tooltip, but the drift is still there)

    • Set time to 0 on the paused timeline before switching

    • Adding Wait 0 between Play/Pause calls to force different ordering across ticks (this actually changes which transition the offset shows up on, but never removes it)

    • "Warming up" every timeline once with Play all before ever using them for real gameplay

    I noticed in your segmented boss fight example that all the different timelines are played from inside a function. Is using a function a requirement for timelines to work correctly, or just a structural choice in that example?

  • No one can help me about this issue?

    It's really a big trouble for me as I'm actually blocked on my project now. The only other solution I have is to make my animation in Spine and then export it using a pluging for Construct but it's really annoying because the timeline was supposed to works fine. Especially because of Construct Animate development…

    At least that was what I though.

  • Hello everyone!

    Ran into something weird while working on a rig using Hierarchy + Timeline. I've got two 4-level leg chains (Body > Leg_[L/R]_Seg1 > Seg2 > Seg3 > Seg4), with an Angle track on each segment in my "Idle" Timeline.

    The issue: if I replay the same Timeline multiple times (Stop then Play again), the angle on the deeper segments drifts on its own. Even when the Angle keyframe values never change between plays.

    What's weird: the drift isn't limited to the hierarchy children, even Body itself (the root, no parent) drifts downward over repeated plays in this example, so this doesn't seem to be purely a parent-child composition issue. Severity is also inconsistent between the two leg chains and between segments at different depths, even though Leg_L and Leg_R have the exact same structure and Angle track setup.

    I already dug around before posting this and found a few older bug reports (issues #7132, #7291, #5943 on Scirra's tracker) that looked like the exact same issue...

    I'm on r495.2, well past those fix versions, so this looks like either a regression or an edge case that slipped through. Maybe?

    I also tried switching the Angle track's Result mode to Absolute, it does stop the drift, but it also completely breaks the composition with the parent's rotation (the child stops following the parent's transform at all). At that point it kind of defeats the whole purpose of using Hierarchy in the first place, since you're back to manually setting every child's absolute transform yourself instead of letting the parent-child relationship do the work.

    I attached the c3p file exemple there: dropbox.com/scl/fi/fui3c4egyy6snywlrn7q6/TimelineHierarchyLegsTest.c3p.zip

    If any of you have the solution for this, I'll really appreciate as I'm blocked on my project with this issue…

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should probably try to reload the file. I just try it on another device and I can open it without any error.

  • Hello everyone!

    I'm actually working on a game which include sometime, a king of duel happening.

    The idea is quite simple, you have to kill the AI before it kills you. It's quite the same gameplay as TowerFall Ascension. Just to give you a global idea.

    I didn't found anything about how I can code a similar AI on the forum or as examples. So I did something that's work a bit for now, here is the capx.

    This file is just an extract from my main project, so some stuff doesn't work like the AI avoiding player's bullets.

    But as you can see, the AI sometimes is acting a bit crazy or is stuck on a wall or can't climb a platform.

    So I would love to have some advices about how I can manage my AI code or if any solutions already exists. Maybe my method isn't the simplest or the good one.

    Thanks you all!

  • You right, I shouldn't us this variable. And I didn't knew about the reversed animation speed. Just updated the file, now I guess it's definitively optimized!

  • Hello everyone,

    I just create a charging button. The idea is to press a button for 2 seconds to validate an action, like in many games.

    Here is the c3p file here.

    It works very well but maybe there is a better way to do it. So I'm curious about any suggestion that can simplify it.

  • Ok I just get it. I was using the Dictionary in a totally wrong way.

    I used to add the instance variables directly in the dictionary proprieties so I didn't have any key in it. I did't created a Json file fist with all my keys and values.

    So here is what I was supposed to do first:

    + System: On start of layout

    -> AJAX: Request MyDictionaryFile.json (tag "Dico")

    -> System: Wait for previous actions to complete

    + AJAX: On "Dico" completed

    -> MyDictionary: Load from JSON string AJAX.LastData

    And now this works fine:

    -> Text: Set text to MyDictionary.Get(MyArray.At(Object.Line,0))

    Maybe it to should be noticed in the manual…

  • Here is a screenshot, maybe it's easier to get where my problem is:

    I also tried something different. First I save my item name in a local variable, so it's exactly the same variable name recorded in my dictionary. Then I compare the variable's names to get the corresponding value (a number in this case)

    But even like this I can't get my value…

  • Hello everyone,

    I have some variables and values in a dictionary and I would like to compare the variable to an entry in an array.

    For exemple in my array I have an entry like "Item_Name1", then I want to get the value from my dictionary with a variable named "Item_Name1"

    I'm actually doing something like this:

    + MyDictionary: For each key

    ----+ MyDictionary: Key MyDictionary.CurrentKey = MyArray.At(Object.Line,0)

    -----> MyDictionary: Set text to MyDictionary.Get(MyDictionary.CurrentValue)

    Object.Line is supposed to give the current X value.

    The Y (0) is the entry I want to compare ("Item_Name1" for my exemple)

    Seems that it can't get the value because it returns "0"

    Any suggestion?

    Thanks!

  • Yep that's it, thanks a lot!

    I thought that "Array.CurValue" was used for every entry entries in the Y column…

mardoch's avatar

mardoch

Member since 21 Nov, 2013

None one is following mardoch yet!

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies