Jump to content
sariel

Revive Template with own gear

Recommended Posts

Hi,

 

when i use the following code in my description.ext the revive system works pretty well.

respawn = 3;
respawnDelay = 15;
respawnTemplates[] = {"Revive", "MenuPosition"};
respawnOnStart = -1;
reviveForceRespawnDelay = 100000;

when a player gets revived he unfortunately looses all his gear and gets it replaced by the standard equip.

does somebody know how to fix this problem?

 

and:

i use "MenuPosition" and "reviveForceRespawnDelay" with no positions set to avoid the players respawning.

is there a smoother way to do so?

setting "Revive" as the only template only causes players to respawn at their last position.

 

thanks for your help.

sariel

Share this post


Link to post
Share on other sites

Add two files to your mission folder:

 

onPlayerKilled.sqf

[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;

onPlayerRespawn.sqf

[player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory;

Now I'm not in front of my gaming PC so I might have an error in there somewhere.. but looks OK.

 

 

 

What do you mean "is there a smoother way to avoid players respawning?"  Can you explain what you are looking to do?

  • Like 2

Share this post


Link to post
Share on other sites

Add two files to your mission folder:

 

onPlayerKilled.sqf

[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;

onPlayerRespawn.sqf

[player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory;

Now I'm not in front of my gaming PC so I might have an error in there somewhere.. but looks OK.

 

 

 

What do you mean "is there a smoother way to avoid players respawning?"  Can you explain what you are looking to do?

 

you sir, are the real mvp. thanks for your great help!

 

The "smoother way":

i set the forceRespawnDelay to a high value because i dont know how to turn off the feature to be able to force the respawn when waiting for the revive.

also i dont want the players to respawn as a player when their revive time is over. i tried to respawn them as spectators and used:

respawnTemplates[] = {"Revive", "Spectator"};

but after a player dies he respawns as a player at his last position.

so i used:

respawnTemplates[] = {"Revive", "MenuPosition"};

and placed no respawn points so they can't respawn.

but i want them to be spectators...

 

any ideas? :)

Share this post


Link to post
Share on other sites

Have you tried looking into the respawn ticket system? They can't respawn unless they have tickets; have the respawn tickets balance at zero. Maybe that's what you're looking for?
 

Share this post


Link to post
Share on other sites

Have you tried looking into the respawn ticket system? They can't respawn unless they have tickets; have the respawn tickets balance at zero. Maybe that's what you're looking for?

 

 

this can't be the problem. when i use:

respawnTemplates[] = {"Revive", "Spectator"};

they DO respawn ... but as players, not as spectators. so the respawn tickets can't be limited...

or did i not get your point?

Share this post


Link to post
Share on other sites

What setting do you have in description.ext for respawn?  I think it should be respawn = 1

Share this post


Link to post
Share on other sites

What setting do you have in description.ext for respawn?  I think it should be respawn = 1

i have 3 ... revive only works with 3 ... tested

Share this post


Link to post
Share on other sites

Hmm... I've never actually tried that before (revive and spectator) so I'm not sure how it's done.  Try searching the forums here or perhaps make a new thread describing the problem.

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

×