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 - Morph

Pages: [1]
1
Graphics / Re: switching frames
« on: May 25, 2013, 06:11:16 pm »
Well, it was an attempt to make the frame goes back to the way it was before attacking. :D

2
Graphics / switching frames
« on: May 25, 2013, 05:39:43 pm »
Hello there.
I have been having a bit of a problem that seems quite hard for me to handle in switching frames on key pressed buttons.
In the code, I have created an enum that has five commands "Up, Down,Left, Right, Attack". When the command attack is initiated, I cannot bring the sprite back to the way it was before attacking.
My code :

else if(sf::Keyboard::isKeyPressed(sf::Keyboard::Space))
      {
         source.y=Attack;
                        if(Event.type==sf::Event::KeyReleased && Event.key.code==sf::Keyboard::Space)
                                   source.y=Left;
      }

I cannot understand why it cannot check the condition there

3
General / Re: SFML 2.0 GetInput
« on: May 11, 2013, 06:46:36 am »
I see, thank you very much, that has been helpful, indeed :)

4
General / Re: SFML 2.0 GetInput
« on: May 11, 2013, 05:39:59 am »
But hey.. would it only be like "if(sf::Keyboard::isKeyPressed)"? neglecting any of the parameter intended ?

5
General / Re: SFML 2.0 GetInput
« on: May 11, 2013, 03:27:08 am »
Yeah, I see. Thanks :) Just tried it out and it worked :D

6
General / SFML 2.0 GetInput
« on: May 11, 2013, 01:54:24 am »
Umm, hello guys. I was following up a series on how to code a platformer game on the 1.6 version. However, when I moved to try out the 2.0 version, I had a trouble converting a statement so far. It goes as the following :

Window.GetInput().IsKeyDown(key); //KeyDown is a function inside a class I made to handle the pressed down buttons of a keyboard and key is an int in the function's parameter

so I was wondering on how to make that line work as a 2.0 code.
Thanks in advance :)

Pages: [1]
anything