How do I fix this bullet behavior?

0 favourites
  • 3 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • I'm trying to make a barrel that shoots a cannonball with gravity (bullet behavior), that can fall back into the cannon and can then be shot again. The problem is, each time the cannonball is shot again the force/distance it travels is less than last time, and I don't know how to fix it.

    Is there a way to reset the bullet values so that the cannonball behaves the same on each shot? Here's a C3P file to showcase the problem (press Z to shoot the cannonball and notice how each time it travels a shorter distance):

    dropbox.com/s/ivqz35rb1me2hk1/buggybarrel.c3p

    I've tried several things and I'm running out of ideas on how to fix this so any help would be greatly appreciated. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the editor set the bullet behaviour to enabled then change our events to this.

    You should set the speed at the start of each shot, and return it to zero when it lands back in the cannon. You don't need to enable or disable the bullet behaviour every time you fire or it lands, but you could still do that if you want.

  • calminthenight Ah, I thought I'd already tried that too but apparently not, that indeed fixed it! I just recently got back to Construct after a long while so my skills are a bit rusty and just learning the ropes again, so really appreciate the help:) Thanks again!

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