How do I Change the animations?

  • Could it be the player(gun) is solid and the invisible player isn't?

    I can only guess what is happening, but that might cause the invisible player to be able to move while the player(gun) is held back by the wall..

    I've never had such things happen.

    It must be the strange way you have set things up..

  • Okey LittleStain I created the animations Player/Glock/Crouch on The main character called Player!

    But the animation isn't playing ? something is wrong?

  • You are trying to play both animations at the same time..

    Both run left as glock run left have the same conditions..

  • I know LittleStain, I'm not sure what to do to prevent that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add more conditions..

    for example

    give the player a boolean variable IsHoldingGun

    If the player is holding the gun set the boolean variable to true

    else set the boolean variable to false

    on a pressed

    --player variable IsHoldingGun is true

    player play animation Player(gun)run

    -- else

    player play animation Playerrun

    There are many more ways, but this is the most straightforward

  • Bad with boolean....

  • This is minor point out but you should set the animation once. The way it is now it might give a stutter effect being that everytime for example the 'A button is down' event is trigger is sets the animation back to the beginning instead of letting it finish its full animation cycle. So instead it should be a event for when the a button is first pressed to set the animation for that button OR you can test to make sure it isn't already playing that animation.

    Update **

    just add another condition that checks the Boolean variable.

    So it should be

    A is down AND is holding_Glock then do this

    or make a event that is just 'is holding_Glock' then make all the glock controls a sub-event of it. Which is cleaner.

  • Also I looked again for setting the idle animation you have it that when a or d is down to set the animation to Idle when the event should be inverted to say when A and D is not down. You invert by right clicking the event and you will see INVERT.

  • Okey! Thanks I did the Boolean system it works now!

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