How do I Fix this bullet behaviour problem

0 favourites
  • 6 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • Hi. When end of touch it enables bullet for arrow . The arrow hit a wall and got pinned and disables bullet behaviour.

    When i shot again it enables bullet again and the arrow that is aleady pinned to a wall start rotating and doing weird things because the bullet was also activated to the pinned one. How do i make it so the arrows that are already pinned to wall will not be affected by the bullet anymore?

  • Instance variable. Keep track of which of your arrows are pinned and pick accordingly before activating the bullet behavior.

  • sorry i cant get it to work, may you explain it a bit more plz. :-/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you make a capx showing just the problem? It's hard to suggest a solution without really knowing whats happening.

    Are you spawning a new arrow and rotating all arrows mid-air?

  • Here is a capx. hit the wall few times to see what is happening to the arrows already pinned

  • Sorry for the delay, I missed your reply.

    I added a Boolean variable to the arrow "NewArrow" default to true.

    Then to each place the arrow is further manipulated, I checked "Is NewArrow"

    Then after it hits the sprite, I change that arrows "NewArrow" value to false. That way only the 1 NewArrow gets adjusted.

    (just noticed the arrow on the layout at the start also flys in when you shoot the first arrow. either destroy all arrows on startup, or move it under the layout so you never see it.)

    Capx included:

    Edit: just realized if you fire many arrows at once, there will be more than one true at a time. (this caused some arrows to go too deep or all the way through.)

    You have a solution already started that does work.

    Replace my "Is NewArrow" events with your "Pick Top Instance" and it works fine without the variable.

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