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

Pages: [1]
1
Graphics / Spawning bullets
« on: May 02, 2012, 07:35:35 am »
Been messing around with SFML a little lately. Anyways, I want to know a simple way how to spawn a bullet and have it move across the screen without having to hold a key down. I know this is simple, it's late, and i'm sort of a noob; but here:

I have the sprite class made and the sprite spawning from the right location. When the "space" key is tapped I want the bullet to move across the screen to the right. The only way it will do this now if the space is held.
Inside while app.isopen loop:

 if (App.GetInput().IsKeyDown(sf::Key::Space)) {

        Bullets.Move(100 * .1, 0);

    }


This is flying right over my head, no idea why. Any help?   :-[

Pages: [1]
anything