Help with pilot exiting/entering vehicle

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • What I have in the example .capx file:

    -A blue square which acts as my plane or whatever. It can fly around the screen freely. That part is done.

    -A red square which will act as my pilot. It can enter and exit the blue square as long as the blue square in on the ground. This part is kind of done though I'm positive it can be done better. I'm using a GroundTrigger sprite to tell the system when the blue square is on the ground. Any tips on making this better would be appreciated.

    Question: The part that has me stumped is when the red square wants to go back into the blue square the blue square for some reason moves every time I enter it. Why does it move?

    Thanks for any help you may have. I appreciate it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try only removing the "set 8 dir speed to..." in both events (entering and exiting the plane). It works then

  • It seems to work but if you are moving left or right and while moving you jump out of the blue square the blue square will stop. But once you go back in, it will continue in the direction you were moving for a brief moment.

  • I know why now

    Problem is you are using "set direction speed" which are setting the actual object speed in the moment you are entering the plane again. If you use "set maximum speed" your problem goes away. Here is the fixed capx.

  • Yup works beautifully.

    Thank you for helping me out with this.

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