How do I get my characters animation frames to load per hit

0 favourites
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • I have collision and damage animation frames for my character set up but whenever my character gets hit by a enemy it loads the first hurt frame but then loads the second one without even allowing the player to take damage and lose a heart due to the timer. I tried everything but I have no clue on what to do. I like to have the character frames come up by getting hit rather then automatically loading all the frames because of the timer system wanting me to wait a certain amount of seconds. Can anyone help?

  • Create separate animations for when the player is hit.

  • Create separate animations for when the player is hit.

    Doing that but the timer still sets the animations per second rather then loading the 4 animations one by one each time the character takes a hit.

  • I am not sure what the problem is. Can you upload a capx?

  • I am not sure what the problem is. Can you upload a capx?

    I don't know how to do that. What do I do to upload a capx?

  • I am not sure what the problem is. Can you upload a capx?

    I tweeted you a picture. twitter.com/TRG9017/status/771200562016595969 I would like to be able to have the animation frames activate once the character is hit one at a time instead of having to wait for it to start when a second goes by. The first animation of the character being hurt should start when the player has a collision with the enemy, the second and the third and finally the fourth should also be that way only when the player takes damage. The system makes me wait per seconds and it ruins the whole point of player damage.

  • Um, why don't you just delete the Wait 1.0 seconds?

    Also, why do you disable the Duck's collisions twice?

  • Um, why don't you just delete the Wait 1.0 seconds?

    Also, why do you disable the Duck's collisions twice?

    I disable the ducks collisions twice because I'm separating the frames for his animation. When I do this the first hurt animation activates and then the second one follows. The first time the duck gets hit by a bottle the animation works but then when the second one tries to start it doesn't work when the duck gets hit. When I keep the animations all together without adding disable the duck skips the first damaged animation and goes right to the second one. When I try to delete the per seconds the duck gets damaged but like I said it also skips the first frame. Meaning if I were to put all 4 stages of frames of the ducks damage the duck would just skip all the stages because of this issue and go right to the last frame before being destroy beyond hit.

    When I delete the 1.0 seconds the player collision animation.

  • Highdry012 Please don't take this the wrong way, but you're doing a whole bunch of things incorrectly in what should be a fairly straight-forward task. May I suggest maybe trying out some of the beginner tutorials to get a better idea of how C2 works, first, and then come back and see if you can't figure this out.

  • Highdry012 Please don't take this the wrong way, but you're doing a whole bunch of things incorrectly in what should be a fairly straight-forward task. May I suggest maybe trying out some of the beginner tutorials to get a better idea of how C2 works, first, and then come back and see if you can't figure this out.

    I tried that and this shouldn't be such a task. All I want is an answer on my question. I even asked SCIRRA on twitter and they didn't even know the answer. Why is it such a hard thing it's like mario for example.

    In super mario bros Mario has lives and each time he gets hurt he goes from big to medium to small to dead. But in that case the creators of mario didn't program mario to have that transformation in seconds. No. They had mario get hit by an enemy and have mario get damaged when he actually got hit, there was no set timer. I'm stuck with the timer making my animation frames pop up when the duck isn't getting hit. The first time the duck gets hit the animation works fine. Then the system wait per second function causes the duck to load the next frame without being hit due to the timer. I would like to know how to change that. I have looked online youtube for videos on this and through the forum but nobody seems to know what to do.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The reason everyone is having such a hard time answering you is not the difficulty of what you're trying to do. It's the difficulty of explaining it to someone who is thinking about this the way that you are. Your approach is so far off, we're not sure where to start. It's also kind of hard to know exactly what it is you're trying to do, based on your approach.

    You keep using the word timer. Are you using the timer behaviour? or are you referring to the wait x seconds command? You keep saying you don't want to have to rely on the timer to switch animations. You don't. But then why do you keep programming it that way? Is the problem that you just need to set your animation speed to not play? could you use "on animation finished" to trigger the next animation? I'm trying to help, honest. I just think you're not going to get much farther if you don't get a better understanding of how C2 works..

    Have you done many of the tutorials? I really feel if you had, you would have approached this much differently than you have.

    I mean no offense, and I hope you don't take it as such. I'm trying to help

    EDIT: also, if you'll upload a capx (the forums will tell you how to do this). I guarantee someone will get it working like you want.

  • The reason everyone is having such a hard time answering you is not the difficulty of what you're trying to do. It's the difficulty of explaining it to someone who is thinking about this the way that you are. Your approach is so far off, we're not sure where to start. It's also kind of hard to know exactly what it is you're trying to do, based on your approach.

    You keep using the word timer. Are you using the timer behaviour? or are you referring to the wait x seconds command? You keep saying you don't want to have to rely on the timer to switch animations. You don't. But then why do you keep programming it that way? Is the problem that you just need to set your animation speed to not play? could you use "on animation finished" to trigger the next animation? I'm trying to help, honest. I just think you're not going to get much farther if you don't get a better understanding of how C2 works..

    Have you done many of the tutorials? I really feel if you had, you would have approached this much differently than you have.

    I mean no offense, and I hope you don't take it as such. I'm trying to help

    EDIT: also, if you'll upload a capx (the forums will tell you how to do this). I guarantee someone will get it working like you want.

    Yes I'm using the system wait 1.0 seconds behavior. I don't know any other way to have the collision frames show up without turning on in seconds. That's why I need help lol I want to know how to make the animations turn on when the character gets hit each at a time. I like for the animation to play it's just that it plays the second one automatically after the seconds go down without allowing the player to take a hit in order to achieve damage. How could I trigger the animation fin to trigger the next animation that sounds like what I'm looking for

  • First this: 'wait' is NOT a timer. It just postpones actions.

    It is not (and still not) easy to answher this question, without to be able to correct your .capx

    I am afraid that you not gonna understand 'words', (based on you totaly weird events) but lets try.

    Taking your capx as example would be better.

    You want it to happening on a 'on collisson'. Not every so mutch seconds. You have 4 stages of dead. I suppose you have 4 animations named "Hurt1", "Hurt2" , "Hurt3" and "Hurt4".

    Give the duck an instance variable 'Stage' ... number .. = 0

    Condition > On Duck collission with Bottle

    Action > add 1 to 'Stage'

    Action > start animation "Hurt"&str(Duck.Stage)

    Action > destroy the bottle

    Condition > Duck > On finished "Hurt4"

    Action > destroy Duck

  • First this: 'wait' is NOT a timer. It just postpones actions.

    It is not (and still not) easy to answher this question, without to be able to correct your .capx

    I am afraid that you not gonna understand 'words', (based on you totaly weird events) but lets try.

    Taking your capx as example would be better.

    You want it to happening on a 'on collisson'. Not every so mutch seconds. You have 4 stages of dead. I suppose you have 4 animations named "Hurt1", "Hurt2" , "Hurt3" and "Hurt4". Yes this is correct

    Give the duck an instance variable 'Stage' ... number .. = 0

    Condition > On Duck collission with Bottle

    Action > add 1 to 'Stage'

    Action > start animation "Hurt"&str(Duck.Stage)

    Action > destroy the bottle

    I don't want the duck to destroy the bottle though. I have the bottle destroying the duck already but that's at hurt4.

    Condition > Duck > On finished "Hurt4"

    Action > destroy Duck

    When I do this the duck just either dies/ goes through killing the bottles.

    Since I can't upload a .capx here's a link to my video I posted on Youtube on the topic of this question. It shows my problem and hopefully will help you see what I'm talking about. youtube.com/watch

  • Then dont destroy them. Geez. I expected the bottles to behave as bullets.

    Why can't you upload a capx to any sharing service ? You know how to post links.

    The video sure shows your problem ! Time you see it too.

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