Jump to content
druminator

Make a trigger activate a new respawn point?

Recommended Posts

So I have this mission were a squad is moving to 5 diffrent locations and when a unit enters the 2nd location/trigger I want the respawn at the first location to be replaced by a respawn at the 2nd location. Meaning if someone dies at the 2nd location for example I want the unit to respawn there. At the moment i've set up the mission like this:

respawn ="base";
respawndelay = 1;
respawnTemplatesWest[] = {"MenuPosition"};

in description.ext and then 5 markers as respawn_west1, respawn_west2 and so on.

That works great but I don't want the menu because it's just confusing for everyone where to spawn as i've noticed, I want the units to spawn at the correct marker without the menu. I'm thinking that a trigger at the 2nd location with some kind of code connecting it to [respawn_west2] maybe works? Maybe setTaskState would be useful somehow?

I found this:

"respawn_west" setmarkerpos (getmarkerpos "new_respawn");

but i'm not sure what to do with it other than I understand that the "new_respawn" replaces "respawn_west".

Any suggestion would be helpful! :)

Share this post


Link to post
Share on other sites

Your last code is what you would want, and it doesn't replace anything it simply moves the respawn_west marker to another marker's position (in this case "new_respawn").

Share this post


Link to post
Share on other sites

Wow that was surprisingly easy!

So just to demonstrate what I did:

1 marker named "respawn_west" and 4 markers named "new_respawn1", "new respawn2" and so on.

and

4 triggers on repeadetly adding the following in [on action] field:

Trigger 1:

"respawn_west" setmarkerpos (getmarkerpos "new_respawn1");

Trigger 2:

"respawn_west" setmarkerpos (getmarkerpos "new_respawn2");

and repeat that depending on how many respawns you want.

Worked like a charm, now I just need to test it with my squad. Thanks man! :)

Share this post


Link to post
Share on other sites

So while testing in mp with people I realised that the respawn markers/points changes position for everyone immediately and not individually which was what I was looking for. The way it works now is that as soon as someone walks in the trigger the spawn changes position for everyone.

How do I go about to create so that the respawn positions only changes for the specific unit that enters the trigger?

Share this post


Link to post
Share on other sites

I would say just make all the markers locally with the local marker command group, but I don't know if the respawn system will work with local markers :confused:.

Share this post


Link to post
Share on other sites

Oh I forgot about the respawn modules but are those local then? Dosen't they work the same as the markers (excluding the diffrent options) unless you use some kind of code? Is that what you mean with "your condition"?

---------- Post added at 21:42 ---------- Previous post was at 21:38 ----------

I would say just make all the markers locally with the local marker command group, but I don't know if the respawn system will work with local markers :confused:.

Is this what you mean:

https://community.bistudio.com/wiki/createMarkerLocal

Share this post


Link to post
Share on other sites

Hi everyone,

I also have trouble getting respawns to behave in a predictable manner.

So far, I have only managed to enable respawns in multiplayer missions using two simple methods, based on the above posts:

a) In the Editor, setting the Attributes > Multiplayer > Respawn dropdown menu to either "Respawn on Custom Position" or "Respawn on Position of Death". The result is identical: players respawn on their death location. This is independent of where I place the Respawn (Infantry) modules, what I name them, or if I sync them to a trigger that activates.

b) Placing a marker and naming it "respawn_west" or faction appropriate. Even if respawn is disabled in the menu, when starting the scenario, players are forced to choose a spawn location from a map screen (even if there is only one marker). The starting location of characters is completely ignored. 
 

My aim is this: starting the players in their regular positions and once they have activated a trigger, enabling respawns and placing a respawn point. Preferably, the two groups of players would each have their own (default, no menu) spawn location, but this is not essential.

I am missing something important in how the modules work, and I can't find the answer in the BI Wiki or searching this forum. I am confident if someone could robustly explain how the modules work (or how to script the enabling/creation of respawn points), I could figure out the rest.

Thank you for reading this.

Share this post


Link to post
Share on other sites

RespawnOnStart=-1 in description.ext is what I think you are looking for. It will start players at their current positions rather than respawning at start.

 

This thread is really old, you would have had a better chance of getting a faster answer by starting a new thread. 

 

Are you using multiple factions as playable, or just west? You could use a trigger with blufor present and a empty marker named "whatever_x". Then in the activation window:

[west, "whatever_x"] call BIS_fnc_addRespawnPosition;

 

Hope it helps you, and good luck!

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

×