Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DarknessxBuilder

Pages: [1]
1
General / Need Help With IDLE ANIMATION (Character Standing Still)
« on: June 03, 2017, 06:47:22 pm »
hi all im new to sfml and have been trying to make a game and require a bit of help

when i want my chracater go left and right i use these 2 functions.

      if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left))}

      if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right))

and now i want to animate my character standing still is their a function to detect if their isnt any keypresses
i tried using this function below but it didnt work

      if (sf::Event::KeyReleased)

Any Ideas?

Pages: [1]
anything