Jump to content
Sign in to follow this  
SirBa5terD

Keep waypoints after respawn

Recommended Posts

Hello there 🙂

I am using a simple respawn script, that gives players the ability to spawn near the teamleader:

player setVariable["Saved_Loadout",getUnitLoadout player];

removeAllWeapons player;
removeGoggles player;
removeHeadgear player;
removeVest player;
removeUniform player;
removeAllAssignedItems player;
clearAllItemsFromBackpack player;
removeBackpack player;
player setUnitLoadout(player getVariable["Saved_Loadout",[]]);


So it also saves the actual loadout and restores that.

Question 1:

Is there a way to achive such a respawn, like it is in the Apex campaign without those scripts?

Question 2:

The player team has some waypoints, that will activate several functions ( helicopter staring for example ).

BUT

When all the players where killed once, it seems the waypoints do not longer "belong" to that unit and theeffects of activation for the waypoint take act immediately.

Is there a fix for that?



Thanks in advance!

Share this post


Link to post
Share on other sites

1.  Use a Respawn event handler.  Don't use "player" for setVariable / getVariable, because the player object will change.  Refer to _unit and _corpse as given in the example.

 

2.  Waypoints are a group function, they belong to the group.  When a team gets wiped out, the group is subject to getting deleted.  Waypoints get deleted with the group.  There are various ways to prevent this sort of thing happening.  What kind of activation effects are you saying happened?

Share this post


Link to post
Share on other sites

I have connected a "get in" waypoint of the infantery group with the "Load" waypoint of a helicopter. So after the group got in the heli, it will fly to another location, asintended. It does work normally, until the group got wiped out once.

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
Sign in to follow this  

×