Help with pilot exiting/entering vehicle

Get help using Construct 2

Post » Mon Mar 16, 2015 5:20 pm

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.
You do not have the required permissions to view the files attached to this post.
Last edited by Ancha on Mon Mar 16, 2015 5:49 pm, edited 1 time in total.
B
25
S
3
Posts: 10
Reputation: 1,397

Post » Mon Mar 16, 2015 5:26 pm

Try only removing the "set 8 dir speed to..." in both events (entering and exiting the plane). It works then ;)
B
25
S
3
G
1
Posts: 53
Reputation: 1,417

Post » Mon Mar 16, 2015 5:41 pm

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.
B
25
S
3
Posts: 10
Reputation: 1,397

Post » Mon Mar 16, 2015 5:53 pm

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. ;)
You do not have the required permissions to view the files attached to this post.
B
25
S
3
G
1
Posts: 53
Reputation: 1,417

Post » Mon Mar 16, 2015 7:19 pm

Yup works beautifully.
Thank you for helping me out with this.
B
25
S
3
Posts: 10
Reputation: 1,397


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 0 guests