Why do my bullets curve like this?

Noroup

  • *
  • Posts: 134
Watch the video. They always hit an enemy and curve randomly to the side. I tried to replicate it as best as possible to my other bullets which don't curve, but it never works for some reason.

In the end, I show my settings for the bullet and the fire bullet event.

Any help is greatly appreciated, thanks.

https://www.youtube.com/watch?v=VEykpLvq-b4&feature=youtu.be

aries420

  • Posts: 35
I'm thinking when you bullet hits the target it bounces off it from colliding,  with it so it changes direction.  I'd suggest  adding something like , When collides with actor type  kill self to you bullet. And after looking through the Fire Bullet Behavior I didn't see anywhere where it kills the projectile.

JeffreyDriver

  • *
  • Posts: 2149
Try turning your collision shapes into sensors.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

Noroup

  • *
  • Posts: 134
I'm thinking when you bullet hits the target it bounces off it from colliding,  with it so it changes direction.  I'd suggest  adding something like , When collides with actor type  kill self to you bullet. And after looking through the Fire Bullet Behavior I didn't see anywhere where it kills the projectile.
I want the bullet to go through the enemy clouds and kill other clouds

Try turning your collision shapes into sensors.
What does this do?

Noroup

  • *
  • Posts: 134
Try turning your collision shapes into sensors.
I read on it and I'll try it when I get home, thanks

decafpanda

  • Posts: 205
You can add an always event to your  bullet behavior that sets it's Y speed to 0.

Do this.  Go to your bullet behavior and select "edit behavior"

Go to the left and select "add event"  choose the "always" event

Go to the pallette of blocks on the right.

Click on the "actor" section.

Go to the "motion" sub tab

Drag over the "set x speed" block and drop it in

Change "x" to "y"

It should automatically say "to self"

So the code reads "always set Y speed to 0 for self"

This will a me sure it never goes up and down, the only way it can go is horizontal.

Make sure this event or behavior is attached to the BULLET not the actor creating it

decafpanda

  • Posts: 205
Oh and making it a sensor probably will do the trick too.  I like to get into the practice of creating the above "always set speed" events to actors that I absolutely know will not need to move a certain direction.

I ran into a bug where my enemies randomly would just fall off the map for no reason and the above solution solved solved the problem.

Noroup

  • *
  • Posts: 134
You can add an always event to your  bullet behavior that sets it's Y speed to 0.

Do this.  Go to your bullet behavior and select "edit behavior"

Go to the left and select "add event"  choose the "always" event

Go to the pallette of blocks on the right.

Click on the "actor" section.

Go to the "motion" sub tab

Drag over the "set x speed" block and drop it in

Change "x" to "y"

It should automatically say "to self"

So the code reads "always set Y speed to 0 for self"

This will a me sure it never goes up and down, the only way it can go is horizontal.

Make sure this event or behavior is attached to the BULLET not the actor creating it
Thank you sir! I really appreciate it!