Jump to content
Saltoperator

How can I force respawning dead players by trigger?

Recommended Posts

Instead of adding respawn tickets when certain conditions are met like I have done before, I would like to simply have dead players respawn automatically. 

 

I am not sure what function I should use, if any. The first one that came to mind was forceRespawn, but that only forces living players to respawn...

 

Any help with this would be greatly appreciated!

Share this post


Link to post
Share on other sites

Setting respawn=1 will make them spawn quick, so you want them to respawn, respawn where?

Where they died, at a base marker, instant respawn is already possible with the basic base respawn its just a matter of time.

     Its about as automatic as your going to get imo, do they have a choice where they will respawn because

      then you can do various things with respawn like:

- Have them choose what spawn point on the map they will respawn at.

- Spawn on a squad leader, car, boat, plane, heli.

 

If they respawn will they respawn with the gear they had prior to dying, or you have that set already, or you

want them to respawn with default unit loadouts?

     So what exactly is your intent behind respawning automatically? Details and specifics would help you here, what are you trying to do

in your mission where you need automatically respawn?

  • Like 1

Share this post


Link to post
Share on other sites

Yes, it was poorly explained.

 

Respawn template is "BASE" / Respawn on Custom Position. In the current mission I am making, I only have one respawn position at a time. When the playable area shifts, I simply delete the old respawn position and create a new one closer to the action. The player cannot select respawn position, and hence respawns automatically at the only respawn position in the scenario.

 

My idea is that players do not get to respawn when they die, until a certain condition is met.

 

Example:

Players are tasked with eliminating Rifleman Ron. Out of 10 players, 9 are killed. The last player is able to kill Ron - which in turn respawns the 9 dead players.

 

What I could do is of course add respawn tickets on activation of a trigger that checks if Ron is dead. This means I would have to write a script that checks how many players are dead and add the appropriate amount of tickets. I am just wondering if there is an alternative way of doing this without using tickets.

Share this post


Link to post
Share on other sites
11 hours ago, Saltoperator said:

When the playable area shifts, I simply delete the old respawn position and create a new one closer to the action.

So your playing as Zues to do this or is the marker or module being deleted with a certain code when the objectives/tasks for the area are cleared?

Another way is to use the respawn position module and have it move when the area is cleared, i have a video on how to do this if your interested in that idea LINK

11 hours ago, Saltoperator said:

I am just wondering if there is an alternative way of doing this without using tickets.

Offhand i cant think of anything, i think that is a good idea to have a trigger check to see if the objectives you set are dead, and to add tickets, maybe

someone else would have a better alternative. @pierremgi

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Gunter Severloh said:

So your playing as Zues to do this or is the marker or module being deleted with a certain code when the objectives/tasks for the area are cleared?

Another way is to use the respawn position module and have it move when the area is cleared, i have a video on how to do this if your interested in that idea LINK

 

No, it is not Zeus - it is a regular scenario where the playable area opens up more and more as the player progresses through the objectives (out of bounds/restricted areas change over time).

 

Initially, I did add and remove using BIS_fnc_addRespawnPosition and BIS_fnc_removeRespawnPosition. I did however end up simply moving the respawn position using setPos instead - like you said - since I only have one respawn position anyway.

 

 

Share this post


Link to post
Share on other sites
12 hours ago, pierremgi said:

I didn't test it but, perhaps, setPlayerRespawnTime  could help. Large amount of time by default, set to 1 second when conditions are met.

Actually not a bad idea, thanks! 😀

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×