Bullet Behavior Questions

0 favourites
  • 3 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • Hey guys I just have a few questions that involves messing with the angle and angle of motion for bullet behavior thank you for taking the time to read them.

    1) Is there a way to set an objects angle/angle of motion outside of using the event sheet? In other words every time I create the bullet I don't want to have to keep setting angle of motion, because several bullet objects are created at once.

    I have tried setting it on Start of layout but it seems that if there is no instance present or the last instance of the sprite is destroyed it goes back to the default 0

    2) Is there a consistent way to have bullet fly to a specific spot on the map without having to using the command Set Angle to Position?

    The reason this doesn't work for me is because it causes the bullet object to rotate and I have an animation pinned to the bullet and this also causes the animation to rotate.

    So far I have been using the Set Angle of Motion command and putting in a numeric angle by hand. Then just using another object to deflect the bullet at a different angle that is again set by hand. The major issue with this is its not consistent and eventually the bullet sprite goes off course and misses its mark.

    Sorry if this was confusing, if I need to clear anything up just let me know. Thank you for taking the time to help.

  • It is a bit confusing indeed.

    Posting a capx would help helping you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I apologize for the confusion. I have uploaded a CAPX that will hopefully shine some light on what I'm trying to accomplish

    In the file I have uploaded the blue square start at the origin of Orange squared labeled OrangeUR. It then flies at an angle of 180, that I have set in the Event Sheet.

    After this when it overlaps its target it just changes it angle of motion to point itself towards the next Orange square. The issue that I'm talking about with this method I'm using is that the blue square never actually comes near the origin of the next square. This means its never on the actual path that I was looking for.

    The big issue with this, and you can see what I'm talking about if you let the blue square fly around for a while, is that its path is not consistent. Eventually the blue square starts hitting the orange squares in different spots and this changes its overall path.

    I know that this example represents repeated movement and using the Sin movement function has helped me get around this issue with some stuff. My issue comes up because sometimes I don't want movement to be a cycle. Also my angles of motion aren't always nice 90 degree angles sometimes it 60 or 30 and this makes the movement even farther off.

    Thank you very much for taking the time to take a look and help me.

    Game File

    dl.dropbox.com/u/64691866/BulletMovement.capx

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