Collision glitch

mupcraftmupcraft Member Posts: 7
edited October 2015 in Working with GS (PC)

Hi Guys! I'm making a platform game (its a little rough around the edges at the minute and missing some frames of animation) and when my character collides with an enemy head on 70% of the time he changes to his "fallen on my butt" animation and stops as expected but the other 30% of the time he flickers between running and fallen animations for about half a second and the camera jolts.

I have included a video so that you can watch. please watch until the end because as previously stated, it took several attempts to replicate the bug.

Can anyone (without looking at the entire project) tell me why this occurring?

Thanks in advance for your help and sorry if this is in the wrong section.

Comments

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    It looked like the actor stopped colliding for a second which caused the image to revert back to the running animation. You should set a boolean attribute that says when the player collides with enemy change boolean "I collided" to true.

    When "I collided" is true change to fallen animation.
    When "I collided" is false change to running animation.

    If this doesn't work can you post a screenshot of your rules?

    I'm just guessing based on the information given.

  • mupcraftmupcraft Member Posts: 7
    edited October 2015

    Hi RabidParrot, I just tried it and the results are the same. I will post a screen of all my rules in my lunch break (I'm at work at the minute).

  • IceboxIcebox Member Posts: 1,485

    Not sure but it might be a layer related problem

  • mupcraftmupcraft Member Posts: 7

    I'll be taking my lunch in 30 minutes and posting all the rules I have for the player character then. Hopefully I can get this fixed as its one of two bugs I cant squish. Once I've fixed it all up I can polish it and make it look nicer haha.

  • mupcraftmupcraft Member Posts: 7
    edited October 2015

    ok here we go, heres allllll the rules I have for the player character. theres a lot.

    http://postimg.org/image/fuip26feb/

    Thanks for your help

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    Make sure you don't let the running animation occur if "i collided" is true.

    Also you probably don't need to loop the fall animation. You probably just need a change image rule.

    If "i collided" is false,

    Allow running animation.

    otherwise,

    Change image to fall

  • mupcraftmupcraft Member Posts: 7

    Thank you, I think I will change the running code by adding a "Running" boolean so if "death, jump and fallen" are false running is true. if they are true running is false. Thank you for the advice. I really appreciate it. I'll let you know if it works.

  • SocksSocks London, UK.Member Posts: 12,822

    Collision Glitch is a good name for a game.

  • mupcraftmupcraft Member Posts: 7

    its still doing it :( maybe I should start again?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited October 2015

    Somewhere there is a conflict in your code that occurs during that event. Wow your code order is not refined. Remember code fires from top to bottom in an actor. You should move the camera control to the top of the stack. I haven't seen the conflict yet but I'll keep looking but that code order could be the issue.

  • IceboxIcebox Member Posts: 1,485
    edited October 2015

    @mupcraft Is the player below the enemy or is he above ? I really think its a layer problem , those glitches 80 % of the time happens when you collide and the enemy is above the Hero on the layers. It used to happen when I used to put my elevator actor above the hero actor. the animation glitches. But not 100 % sure , if its the same case here , but when it works 70 % of the time and glitches only a few times , it might be a layer problem.

  • mupcraftmupcraft Member Posts: 7

    Hi guys, I fixed it. and yeah, i need to arrange the code order. For some reason the "death start" boolean was casing this. I really dont know how.

Sign In or Register to comment.