Joluk

Respawn Problems

8 posts in this topic

Hello Dying Light community,

 

I have a question about the respawn flag of the spawnpoint. How can I control were the player will respawn after he dies. I thought it would be the nearest Spawnpoint with the flag respawn.

But now he respawns at a Spawnpoint that only should be used later in the game.

 

How does the phase ",checkpoint" work and can I use it to control the respawn of the player?

Or do I have to disable all the Spawnpoints that I don't want as a respawn in this part of the quest?

 

Best regards

 

Joluk

Share this post


Link to post
Share on other sites

I think disabling should work. Havent tried yet but its the impression i have of how other people have done it. Ill also need to control spawnpoints on my map.

Share this post


Link to post
Share on other sites

Check respawn and uncheck m_QEnableState

Inside all questHub respawners except for the mapStart spawnpoint (disable mapStart once player reaches next

Goto destination).

Now after each important goto destination

Enable a new spawn, disable the old one.

Make sure there ´s always some spawn enabled

Or it could make serious issues.

 

Personally i do it this way cause i never figured

How checkpoint works out.

 

It makes some extra code but it is easy to

Debug as long as you place a sensor goto

 

(NEVER use sensor goto object if you disabled the minimap hud

because the orange point or objective destination will be invisible

and sensor goto will have the orange point in the center of the box

so the player will miss objectives often as the hud is hided.

And the whole quest will be broken.)

(Instead of sensor goto, use a marker object or any model object in your map

then, set the ,goto's quest code phase to use the marker so that

you can add distance parameter (sensor goto does not have distance parameter).

You can use the distance counter tool to check distances in the world.

 

In a strategic place.

Also to enable new spawn and disable old one after goto phase

So that your code is clear and it divide your

Map with chapters and each chapter have its own

Spawnpoints.

 

,goto _ sensor_goto first_respawn_on_tower
    ,wait _ 0.1
    ,enable _ QuestHub respawn_on_tower
    ,wait _ 0.1
    ,disable _ QuestHub old_respawner_on_bridge

http://steamcommunity.com/workshop/discussions/-1/613958868356136551/?appid=239140

Edited by cr1m3

Share this post


Link to post
Share on other sites

Ok I tried that and it worked. But not 100% of the time. I don't know why but one respawnpoint does not work. Instead, the player respawns at the coordinates 0/0/0. Sounds like the game doesn't find a respawn point and sends the player back to a default location. Any ideas?

Share this post


Link to post
Share on other sites

Ok I tried that and it worked. But not 100% of the time. I don't know why but one respawnpoint does not work. Instead, the player respawns at the coordinates 0/0/0. Sounds like the game doesn't find a respawn point and sends the player back to a default location. Any ideas?

Did the player is falling under map?

 

Seems like when you spawn under map.

I saw some checkbox in the spawnpoint attributes,

UseNavMesh for more precise spawns.

https://gyazo.com/210f655a4936bc257a8da6cf95311eb4

 

Also if the player is falling underground, i noticed it never

Happen with terrain, only with floor objects.

 

http://steamcommunity.com/workshop/discussions/18446744073709551615/353915953244620475/?appid=239140

Share this post


Link to post
Share on other sites

No he simply respawns at 0/0/0 instead at the spawnpoint. There is a flor under the player at this position and I don't know what will happen if I remove it for a test.

I will try to check the UseNavMesh box.

When I find a solution I will let you know.

 

Share this post


Link to post
Share on other sites

After trying for hours, I finally found out how respawnpoints are working and what my problem was.

I used Spawnpoints for this with the flag “Respawn”

It looks like that respawnpoints only enable when you come close to them. I don't know how close you have to get to enable them. But when they are enabled you will respawn always there. So there is no problem in having more than one spawnpoint in one big area. If you have one enabled and get close to another one the new respawn will automatically be enabled. (IMPORTAND: This works completely without quest phases!) The easiest way to do this is to make the respawn point the same spawnpoint as you used in the goto phase, so the player gets automatically close to a new respawn.

The phase, checkpoint could be used to set a respawnpoint as your new respawnpoint without having to go to this point. But I didn't test this, its only a presumption.

My Problem was, that I disabled my last respawn and enabled a new one, but the new one was a bit far away so when the player died without going close to this new spawnpoint first, the games didn't find a respawnpoint and I respawned at 0/0/0.

If you have any questions, comment down below.

Best regards

Joluk

Share this post


Link to post
Share on other sites

setting a respawn point with ,checkpoint doesn't avoid you being respawned at 0,0,0, if the respawn point is far away (and you didn't enable it by passing near it)

at least not in my example. i also got that 0,0,0 respawn when not setting the flag "respawn" to the SpawnPoint, nor enable another spawn point.

Edited by doomguy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now