Animation Trigger Bug?

0 favourites
  • 11 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hi

    I'm having some trouble lately with the triggers, in this case, is with the (on Animation Finished)

    After the Animation finish, I change the Animation & size to 64x64 but it doesn't work maybe again I did something really stupid that I cant see or this is a bug??

    How to reproduce:

    Left click Mouse to start the animation & on animation finish, you can right-click on any tile it will update the text object to display the UID & Size of that tile

    The size of the tiles after animation finished it should change to 64x64 but it doesn't work

    Capx: https://www.dropbox.com/s/m3698pqez19euyn/Animation%20Bug1.capx?dl=0

    I'm using the last stable release r250 just in case you cant open it

  • Hi

    I'm having some trouble lately with the triggers, in this case, is with the (on Animation Finished)

    After the Animation finish, I change the Animation & size to 64x64 but it doesn't work maybe again I did something really stupid that I cant see or this is a bug??

    How to reproduce:

    Left click Mouse to start the animation & on animation finish, you can right-click on any tile it will update the text object to display the UID & Size of that tile

    The size of the tiles after animation finished it should change to 64x64 but it doesn't work

    Capx: https://www.dropbox.com/s/m3698pqez19euyn/Animation%20Bug1.capx?dl=0

    I'm using the last stable release r250 just in case you cant open it

    hi, try this

  • Hi NN81

    Thank you, the only problem I was looking more to do it With triggers as they are Many instances of the same object and to avoid keep looping through each instance every thick just to correct the size I would like to find a solution with triggers if it exists.

    I'm more interested in the reason behind why is not working as it should trigger after the animation finishes it make sense for me but I cant understand why doesn't work

    Thanks for your help anyway

  • Hi NN81

    Thank you, the only problem I was looking more to do it With triggers as they are Many instances of the same object and to avoid keep looping through each instance every thick just to correct the size I would like to find a solution with triggers if it exists.

    I'm more interested in the reason behind why is not working as it should trigger after the animation finishes it make sense for me but I cant understand why doesn't work

    Thanks for your help anyway

    your code too work fine just change the Sprite's Deafault animation frame size to same as frames sizes of Animation2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • NN81

    [quote:27hs59d2]your code too work fine just change the Sprite's Deafault animation frame size to same as frames sizes of Animation2.

    That's not really convenient for me as I have one object as a placeholder to hold many different animation and frames all different sizes example you cant put a Tree the same size as the Rock will lose the quality and look weird this is just one example.

    To be honest I could do this in different ways to get it to work here is one

    https://www.dropbox.com/s/p44jh0y07tzvx1k/Animation%20Bug2.capx?dl=0

    But I'm not really happy with that hack, and that doesn't explain why the trigger doesn't work, I still think is a bug unless I miss some other info that I don't yet

    Thank you

  • NN81

    [quote:3fzrh5vp]your code too work fine just change the Sprite's Deafault animation frame size to same as frames sizes of Animation2.

    That's not really convenient for me as I have one object as a placeholder to hold many different animation and frames all different sizes example you cannot put a Tree the same size as the Rock will lose the quality and look weird this is just one example.

    To be honest I could do this in different ways to get it to work here is one

    https://www.dropbox.com/s/p44jh0y07tzvx1k/Animation%20Bug2.capx?dl=0

    But I'm not really happy with that hack, and that doesn't explain why the trigger doesn't work, I still think is a bug unless I miss some other info that I don't yet

    Thank you

  • NN81

    [quote:1i8douy2]your code too work fine just change the Sprite's Deafault animation frame size to same as frames sizes of Animation2.

    That's not really convenient for me as I have one object as a placeholder to hold many different animation and frames all different sizes example you cannot put a Tree the same size as the Rock will lose the quality and look weird this is just one example.

    To be honest I could do this in different ways to get it to work here is one

    https://www.dropbox.com/s/p44jh0y07tzvx1k/Animation%20Bug2.capx?dl=0

    yeah, lot of warkaround, but tecnically you're right, this is a kind of bug, maybe better if you open a specific thread on bug section

    But I'm not really happy with that hack, and that doesn't explain why the trigger doesn't work, I still think is a bug unless I miss some other info that I don't yet

    Thank you

  • I guess is the Triggers Month as I still have weird things happening with the triggers

    Here is another one with (Timers & Functions) I remember many times in the past I did the same thing and it worked so this one at least I know it worked before

    https://www.dropbox.com/s/vsr9i466imls7i2/TimerBug1.capx?dl=0

    At the start of the layout, it activates the Timers for the three sprites to change their animation

    The first animation at the left has the timer for 5 seconds

    The other two have the Timer for 15 seconds

    The Last Sprite at the Right it never triggers after the Timer for 15 seconds runs out, so the same question is this a bug??

  • It looks either a bug or simply an unsupported feature. Two calls to the same Function called at the same time; the picking of the Sprite works for one of the calls, but not the other. <shrug>

  • Re the original animation trigger issue: I don't think there's an issue with the trigger itself; the trigger is firing ok. The problem, from what I can see, has more to do with the Set Size command. It seems that because your animation have different sizes, it somehow gets screwed up.

    I think that, internally, C2 applies a scaling factor when you Set Size by pixels. If Animation2 has 102x103px, and you set the size at 110,110, you set the scaling factor at 1.078.

    Then Animation2 finishes, and then goes to Default animation (250x250px original), which then gets scaled to 269px. (250 x 1.078 == 269px).

    Then you apply a size of 64,64, and the result is 156px. Why?

    Well, I think it's because the 64,64 is applying a scale against the original 110,100 (1.078 scaling). So:

    64/110 == 0.5818

    And so Default animation new size is 269px:

    269 x 0.5818 = 156px

    In a word it assumes the new scale, but that doesn't mean it's necessarily the same pixel size. My recommendation is to compute for scale based on your expected Sprite resolution for a particular animation, then use Set Scale instead of the Set Size.

    N.B. I'd consider this a bug in Set Size, not Animation Trigger. Who wants to report it?

  • faulknermano

    Awesome Explanation Thank you, That makes a lot of sense now,

    you see I have to admit that the two years using construct I never understood why the Animation sizes changes after you swap the animation, for a long time kept me really confuse I thought is the way I did the Events and I just keep changing Events Until I finally get them to work with a lot of work arounds, I tried many times to research this topic of the Animation problem but no one seems to talk about it as I didnt find any threads related to this, so I thought it must be the way I do the events and I keep going hhhh

    Now with your explanation, I finally see that they are more things involved that I didn't know like the scale. This will definitely help me a lot in the future if I ever run again in situations like this

    [quote:1i4n0fwh]

    N.B. I'd consider this a bug in Set Size, not Animation Trigger. Who wants to report it?

    I totally agree, something that simple as to Set an Animation size it shouldn't involve any extra calculation for scale etc.... If the action it says set Size then whatever size you enter there C2 it should apply all the scale and anything that needs automatically

    [quote:1i4n0fwh]My recommendation is to compute for scale based on your expected Sprite resolution for a particular animation, then use Set Scale instead of the Set Size.

    That sounds like a great idea for now until this gets fixed if ever gets fixed

    Thanks a lot for confirming them, I can now open a Bug Report, I wanted to make sure before that it wasn't me that I was doing something crazy with settings or something like that.

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