Path Behavior Problem (FIXED)

Hi everyone!

I’m testing out a bullet path and used a Path Behavior on the bullet object so it follows a curve when fired. It’s working fine so far except that the bullet keeps appearing first at the origin of the Path Behavior. Is there a way to move the origin itself and attach it to the center or hotspot of another object? I really like this Path Behavior feature so if anyone could help, I would really appreciate it! :slight_smile:

I haven’t actually used the Path behavior yet but maybe creating it at the centre of the Princess will do what you want.

Create object Projectile at position Princess.X(Centre);Princess.Y(Centre)

Good thing you didn’t have a problem running this

Do =Princess.X(Centre) to the X position of the path of Projectile
Do =Princess.Y(Centre) to the Y position of the path of Projectile

in the event with no conditions :smiley: :

Thanks a lot for the speedy reply! I found a workaround when you said to change the projectile code into:

I figured that the origin of the path could not be changed but I guess that’s what the Position of the path relative to the scene origin is for. I put the coordinates far off stage/canvas i.e. -500, -500 and changed the spawn point of the projectile as well to -500, -500 to “hide” the projectiles appearing at the path’s starting point.

As for the

not having problems without a condition, it was just probably by accident. I just followed the Tank Shooter Tutorial. :smiley:

Good thing you were able to fix the problem. Happy developing. :smiley: