How do I respawn a player after he dies?

Get help using Construct 2

Post » Thu Mar 20, 2014 10:12 pm

I think when he is teleported , the collision box of the player is in the ground , causing some undefined behavior , kinda like the same as if you were teleported in the ground , then physics would be all no way and something funky would happen, try moving the checkpoints around a bit to give some space for the player to respawn
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,471

Post » Thu Mar 20, 2014 10:36 pm

Nope, it still does it regardless of where I place the node. On the ground, in the sky, under the ground, etc. I've moved it all over the place, but the player still freaks out for a second.
--

So Say We All
B
13
S
4
G
1
Posts: 37
Reputation: 1,330

Post » Thu Mar 20, 2014 10:38 pm

Wait, I figured something out. I originally had the player disabled, system wait for 1 second, spawn, and then player enabled. I took out the system wait and now the player spawns just fine, however, I need the system to wait for a second before spawning, so it looks smooth.
--

So Say We All
B
13
S
4
G
1
Posts: 37
Reputation: 1,330

Post » Thu Mar 20, 2014 10:57 pm

@LoganJFord Preety neat. I was working on a solution to do just that in my game but yours is way cleaner than mine was.
Freefall Bird
B
47
S
9
G
5
Posts: 281
Reputation: 5,803

Post » Thu Mar 20, 2014 11:00 pm

@swordofsolace hmm... can't you just hide the player on spawn for one second and then show him?
Freefall Bird
B
47
S
9
G
5
Posts: 281
Reputation: 5,803

Post » Fri Mar 21, 2014 2:00 am

If you want I can take a look at it for you if you upload the capx tell you whats wrong if i can find it :P
B
19
S
4
Posts: 96
Reputation: 1,487

Post » Fri Mar 21, 2014 2:53 am

I got it! I just set the sys wait timer to 0.25secs, set the player's position to the checkpoint, set the player invisible, set the sys wait timer to 0.25 secs again, then set the player visible. This is probably the most ghetto way of getting the job done, but I'm all ears if somebody has a better suggestion :D
--

So Say We All
B
13
S
4
G
1
Posts: 37
Reputation: 1,330

Post » Fri Mar 21, 2014 2:55 am

I can optimize or recommend alternate methods but I'm a Hand's On / Visual Learner so I would need to see the capx
B
19
S
4
Posts: 96
Reputation: 1,487

Post » Fri Mar 21, 2014 3:31 am

Alright. How should I send it to you?
--

So Say We All
B
13
S
4
G
1
Posts: 37
Reputation: 1,330

Post » Fri Mar 21, 2014 7:34 am

Dropbox is common here or you can pm me and talk there so the thread doesn't get big
B
19
S
4
Posts: 96
Reputation: 1,487

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests