Bullet movement

0 favourites
  • 10 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • Hi, just grabbed the free edition last night to have a look and so far I love the work flow Construct 2 offers. I went through the tutoirals and decided to try something simple to get the hang of stuff..

    I started a small Space Invaders game, my problem is this - No matter what i do i can't make my bullets move in any direction but to the right. ive tried angles, acceleration changes, physics etc.. my bullets always spawn and start moving to the right no matter what angle i have rotated the bullet sprite. Would love some advice on this issue.. thanks!

    Alienhead

  • the angle is the answer, for example make action set angel to 45 or 35 or to player.angle......

    also the condition what condition have you used?? like when space is pressed ? or on start of layout put the .capx and we will help you ^^ also check this tutorial it has some idea of bullets

  • Hi thanks for the reply. Im using the spacebar to spawn a bullet at the ship... its pretty simpel as the bullet should just move upward but it always moves tot eh right.. heres the capx file.. thanks again!

    http://gothasoft.com/temp/si.capx

  • After the spawn action, add an action to the bullet: "set angle of motion: 270"

  • Oh wow... i played with this for the last 8 hours and didnt realize that could be done.. was setting the initial rotation and nothing more.. Thanks so much alspal.

  • here i fixed it:

    https://dl.dropbox.com/u/67034121/scirra%20construct2/si.capx

    some stuffs i made to make it better:

    i changed the imagepoint1 from the ship, i made it on the place that the bullet should spawn.

    also put a behavior on the bullet if it outside the layout it destroy.

    also made the event of angle 270 or (-90 i think)..

  • zsangerous thanks alot! this is an awesome community. Right now im determining how to add a timer/pause between firing the bullet.. as in traditional Space invaders you could have only one bullet on screen at once. might this be something i will have to write in code?

  • Alienhead this can done with 1 condition only o.o

    in the same event (press spacebar)

    put another condition : system -> compare two value , then put first value bullet.count then = or < or anything then 2nd value 1 or 2 the bullets you want on the screen

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • op equations in the condition table.. how awesome is this.. thanks guys.

  • just an idea in the future put this :@ then the name of the people you want to see your comments like zsangerous

    so there will be a notification in my account to see who needs me ^^

    also remember in construct2 you can do what ever you want (2d game) and some 3d examples :P

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