Player sprite keeps teleporting back after vehicle exit

Get help using Construct 2

Post » Thu Aug 27, 2015 9:29 pm

Hi guys

I've got an issue where I have followed a tutorial (which i've tweaked and added my own bits) for a player sprite getting into a car, being a ble to drive it with the camera following it, and then get out.

Problem is when I get out my character teleports back to the point where I entered the vehicle... pretty strange as there is nothing to do with position or coordinates in my event menu.

If anyone has any idea what could be causing this I would be very grateful, I will attach an image of my event page if it might help.

Thanks very much!

Image
B
7
S
1
Posts: 37
Reputation: 557

Post » Thu Aug 27, 2015 9:39 pm

EDIT: Player seems to not be being pinned to the car correctly.
Last edited by Synchronic on Sun Aug 30, 2015 12:31 am, edited 1 time in total.
B
7
S
1
Posts: 37
Reputation: 557

Post » Fri Aug 28, 2015 4:19 am

@Synchronic my solution to this problem was when entering the car was to destroy the player object and when leaving the car to spawn another one on an image point next to the car.

Image

Try this and see if it resolves your issues :)
B
9
S
5
Posts: 40
Reputation: 919

Post » Sun Aug 30, 2015 12:14 am

thedude1693 wrote:@Synchronic my solution to this problem was when entering the car was to destroy the player object and when leaving the car to spawn another one on an image point next to the car.

Image

Try this and see if it resolves your issues :)



Hi, thanks for the reply.

I've seen that work around already, but this game is an RPG which will feature a player inventory etc... and apparently this causes the loss of any items attached to the player etc...


I'm sure what is going wrong is that the player sprite is not pinning to the car when entering, and is only becoming invisible, so that when I leave the vehicle and the player becomes visible again, he is still in the same place as he started because he was never properly pinned to the car in the first place.

Anyone have any thoughts/tips?

Thanks
B
7
S
1
Posts: 37
Reputation: 557

Post » Sun Aug 30, 2015 8:24 pm

Ok I finally managed to get the player to spawn back outside the vehicle through some guesswork/trial and error... but now there are some wierd "physics" issues when I am in the vehicle, such as it stuttering, and seeming like it is colliding with stuff when there is nothing around it... and sometimes when I re-enter the vehicle it goes very very slowly...

I am restart a new thread since my issue is different now.
B
7
S
1
Posts: 37
Reputation: 557


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests