How do I make an object follow a path after created..

0 favourites
  • 6 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • I had another thread created for a similar problem but still didn't get resolved, I can create the object and the path that disappears after the finger is taken off but when the object is created and is using bullet speed the object reacts weird and not as it should with thanks in the last thread I received help off of: TheDom & LittleStain and they gave me these capx which helped: ...

    But I still cant get the path behavior to work once the object is moving using bullet speed.

    I have used a lot of the same code in the above capx but changed it so that upon click the object is not created and the object is created upon layout start.

    Any help would be appreciated!

  • Just to be clear..

    You want the object to move along the path while it is already moving?

    At what time do you want the object to stop it's original direction and start following the path?

    What happens if the player doesn't move his or her finger fast enough?

    Should it be possible to change direction while following a path?

    There are a lot more questions, but these should be the start..

    I can see a lot of issues popping up if you aren't clear about what would happen if a player touches a moving object, without really creating a drawn path..

  • Thanks for the reply, I want an object to be created at the start of the layout and once its created I used bullet movement to set it off at an angle, then the player can put his finger over the object and draw a new path for it to follow, then once the player releases object it will start to follow the path.

    The problem I have is I created the above and it all works fine until you go to touch the object while it is moving and the object acts in a weird manner because of the bullet movement, weird as in it makes the object travel backwards.

    The object would follow the path or angle is was originally spawned at until the player interacts with the object to change its path, if the player doesn't interact with the object it will just continue on its original angle of motion.

    it will be possible to change the objects path after it has been changed by the player.

    Hope that helps answer the question.

  • The issue is that after the path has been drawn, the bullet isn't at the starting position of the path anymore, so you should create events in which you tell the bullet what to do..

    Or you should only make it possible to create a path in the general direction the bullet is travelling..

    Question remains.. What do you expect the bullet to do when selected?

    Should it stop? Continue to fly but make a u-turn back to the path?

    Following the path immediately will be a problem because the bullet will have flown past the path start the next tick..

  • "Following the path immediately will be a problem because the bullet will have flown past the path start the next tick.."

    Yes I think this is the problem, this is a kind of example to which I can explain what I am looking for:

    Imagine a track with a car driving down the main straight then the car comes into view from the left side of layout with the bullet speed set to 35, the player then places their finger on the car to initiate the path drawing function and proceeds to draw a path for it to follow anywhere on the layout for it to follow.

    I hope that gives you a kind of better picture of what im trying to achieve.

    Again thank you for your patience and help with this, much appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any ideas?

    I have taken a look at the other tutorials but none of them cover the object moving when the path is first created.

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