Jump to content

Recommended Posts

Ahh ok.

So all players are able to heal one another, presumably, and if all players are dead then logically the mission is over so you want to end it.

In that case, something like the below would work.

It evaluates in a loop to check all the players. If less than 1 players are not (read that twice) in the BTC 'unconscious' state, then the mission will terminate.

It's probably best to put some sort of delay at the beginning, as I can foresee issues when the players have entered the game but the BTC Revive code has not initialized yet, triggering the _allPlayersDead variable right at the start before the mission begins.

// "init.sqf" or "initServer.sqf"

if (isServer || isDedicated) then {

[] spawn {
	private ["_allPlayersDead"];

	mission_in_progress = TRUE;
	win = FALSE;
	_allPlayersDead = FALSE;

	while {mission_in_progress} do {

		_allPlayersDead = ({(format ["%1",player getVariable "BTC_need_revive"] == "0")} count (playableUnits + switchableUnits)) < 1;

		if (_allPlayersDead) exitWith {
			sleep 1; 
			["LOSER", false] call BIS_fnc_endMissionServer; 
			sleep 1; 
			forceEnd; 
		};

		if (win) exitWith {
			sleep 1; 
			["end1", true] call BIS_fnc_endMissionServer; 
			sleep 1; 
			forceEnd; 
		};
                       sleep 5;
	};
};
};

Edited by MDCCLXXVI

Share this post


Link to post
Share on other sites

I won't update this script anymore, too much time consuming and honestly, i'm start to hating it :D If I re-open the script one more time probably I'm gonna re-write it from scratch and it's not a good idea!

If you want to try something similar but a bit advanced you should take a look at the system used in Hearts and Minds

Share this post


Link to post
Share on other sites
Ahh ok.

So all players are able to heal one another, presumably, and if all players are dead then logically the mission is over so you want to end it.

In that case, something like the below would work.

It evaluates in a loop to check all the players. If less than 1 players are not (read that twice) in the BTC 'unconscious' state, then the mission will terminate.

It's probably best to put some sort of delay at the beginning, as I can foresee issues when the players have entered the game but the BTC Revive code has not initialized yet, triggering the _allPlayersDead variable right at the start before the mission begins.

// "init.sqf" or "initServer.sqf"

if (isServer || isDedicated) then {

[] spawn {
	private ["_allPlayersDead"];

	mission_in_progress = TRUE;
	win = FALSE;
	_allPlayersDead = FALSE;

	while {mission_in_progress} do {

		_allPlayersDead = ({(format ["%1",player getVariable "BTC_need_revive"] == "0")} count (playableUnits + switchableUnits)) < 1;

		if (_allPlayersDead) exitWith {
			sleep 1; 
			["LOSER", false] call BIS_fnc_endMissionServer; 
			sleep 1; 
			forceEnd; 
		};

		if (win) exitWith {
			sleep 1; 
			["end1", true] call BIS_fnc_endMissionServer; 
			sleep 1; 
			forceEnd; 
		};
                       sleep 5;
	};
};
};

Don't work in a Dedicated Server, Just start the mission, end the mission like all is dead. Why? Can help me please?

Share this post


Link to post
Share on other sites

Quick question - is there a way to utilize the mobile respawn aspect of the script without the medical system portion?

Thanks

Share this post


Link to post
Share on other sites
Don't work in a Dedicated Server, Just start the mission, end the mission like all is dead. Why? Can help me please?

Quoting myself, from your post ...

It's probably best to put some sort of delay at the beginning, as I can foresee issues when the players have entered the game but the BTC Revive code has not initialized yet, triggering the _allPlayersDead variable right at the start before the mission begins.

Share this post


Link to post
Share on other sites

I'm assuming this is a local issue with my install, but on every mission I play that has the =BTC= Revive script in it, whenever I die I don't get the Respawn option. I know that the option exists because other players are presented with it. But I just see the countdown timer... no respawn option. Anyone able to shed some light on what's going wrong?

I've double checked that Arma3 is up to date. Here's an example of a mission that contains =BTC= Revive, with a respawn option but when I die, I don't see it...

http://steamcommunity.com/sharedfiles/filedetails/?id=304335316

Share this post


Link to post
Share on other sites

I've to write a new revive script for a friend of mine.

Features:

- SP/MP compatible

- AI supported

- Revive with A3 items

Anyone interested?

Share this post


Link to post
Share on other sites
I've to write a new revive script for a friend of mine.

Features:

- SP/MP compatible

- AI supported

- Revive with A3 items

Anyone interested?

I think A3 has a need for a fresh, working revive system, and I would think with the project here in this thread, you would be a good man for the job :D.

Share this post


Link to post
Share on other sites

I've written it in less than an hour, still trying to find time to test it.

Share this post


Link to post
Share on other sites
I've written it in less than an hour, still trying to find time to test it.

iv been testing it for the past few days.Im not getting any error reports,and its working flawlessly on my end.

Wont work with certain FSM modifying mods,but i does work well for me.And in my massivly modded arma,thats a rare thing ;)

Share this post


Link to post
Share on other sites

Hello,

I am making a multiplayer mission and I need help with some scripting. I have everything done except I am unable to understand how to reset the loadout after dying. I have tried multiple different scripts with no success including =BTC= Revive. I have the files copied from the virtual arsenal that I want to be used as the loadouts, but I do not know how to get them to stay as the loadout after the player dies. I have four types of players per team and each player has a unique loadout. I would love some genuine help not just a redirect to an old thread because I have been searching for a solution for the past two days to no avail. All I want is an explanation and a simple guide on how I might go about fixing this issue, not someone telling me to go search before I ask a question.

Share this post


Link to post
Share on other sites
I've written it in less than an hour, still trying to find time to test it.

look forward to the new script i need a revive script for sp/coop that enables ai to revive ai and players.

Share this post


Link to post
Share on other sites

I like your system very much much but I'm alfarid I can't use it since whenever somebody died he's not coming back with his gear, he just spawning naked, any soultion for that bug please?

Edited by chenettx2

Share this post


Link to post
Share on other sites

hi everybody....

how can i make multiple respawn point's????

i have some mobile respawn vehicles, i have one respawn base....

what i don't have, is a menu to select from(and pinpoint selected respawn point on the map), and multiple respawn bases...

i only have a respawn_West and nothing more... :(

i want something like :

respawn_West_Base, respawn_West_MountainCamp,respawn_West_DesertCamp....

and within the menu, player's could select the names of Base,Mountain or Desert to spawn when the game start's...

Share this post


Link to post
Share on other sites

Is it possible to be able to make this script still show, Player1 was killed by Player2, and also keep score of the kills on the score board?

Share this post


Link to post
Share on other sites

Edit: Sorry, this was for quick revive. nm :)

Edited by EasyEB

Share this post


Link to post
Share on other sites

I believe with both BTC Revive and the Quick Revive, enemies will continue firing at you once you are unconscious. I would think perhaps there is a simple fix for this like maybe using setCaptive when unconscious and then reverting that once revived. Is this possible or has something like this been tried?

Its a little annoying when the enemy basically just empties clip after clip on an unconscious player laying not the ground.

Share this post


Link to post
Share on other sites

It's already like that, since forever. Sometimes it could take a bit to update the player's status on the server tho

Share this post


Link to post
Share on other sites
It's already like that, since forever. Sometimes it could take a bit to update the player's status on the server tho

Not sure what you are saying exactly? Are you saying this has been fixed forever and I shouldn't be seeing this behavior unless the players status on the server hasn't updated yet? If so, I see it happening for a long time and I'm sure it doesn't take that long for the server to update. And not sure what you are keeping track of on the server. Player object is only local to clients not server as far as I know.

Share this post


Link to post
Share on other sites

I want to make a mission with "infinite" (a lot of) revives and only one life (when the timer runs out you die for good).

Is there any compatibility issue with F3 framework and your Revive system i should be aware of?

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

×