Moving back when taking damage

OkyshoOkysho Member Posts: 158
edited November -1 in Working with GS (Mac)
Ok, Besides boss AI Here's one last problem I'm running into in my game creation.

Like most games of this type, I want my character to be knocked backwards a little bit when he takes damage. accompanying this is playing an animation of flinching. I tried adding a behaviour that makes him change velocity, however this ended up to creating a sort of in-game bug where the main character would spawn 300 blaster shots in both directions and lose all his health.

Anyone want to give me a hand in making this bahaviour work?

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Okysho said:
    Ok, Besides boss AI Here's one last problem I'm running into in my game creation.

    Like most games of this type, I want my character to be knocked backwards a little bit when he takes damage. accompanying this is playing an animation of flinching. I tried adding a behaviour that makes him change velocity, however this ended up to creating a sort of in-game bug where the main character would spawn 300 blaster shots in both directions and lose all his health.

    Anyone want to give me a hand in making this bahaviour work?

    have a rule in the player when the player actor overlaps or collides with the bullet actor overlaps or collides with actor bullet

    interpolate self positionx to self position x-5

    then lower the duration in the interpolate rule to make him move back faster
Sign In or Register to comment.