Jump to content

Recommended Posts

I'm working on the pubblic server for resolve some security issue and will be again online today

So how would that look? Something like this maybe?


////////////////// EDITABLE \\\\\\\\\\\\\\\\\\\\\\\\\\
BTC_revive_time_min = 5;
BTC_revive_time_max = 600;
BTC_who_can_revive  = ["Man","Medic2-0","Medic2-1","Medic2-3","Medic2-3"];
BTC_black_screen    = 0;//Black screen + button while unconscious or action wheel and clear view
BTC_active_mobile   = 1;//Active mobile respawn (You have to put in map the vehicle and give it a name. Then you have to add one object per side to move to the mobile (BTC_base_flag_west,BTC_base_flag_east) - (1 = yes, 0 = no))
BTC_mobile_respawn  = 1;//Active the mobile respawn fnc (1 = yes, 0 = no)
BTC_mobile_respawn_time = 30;//Secs delay for mobile vehicle to respawn
BTC_need_first_aid = 1;//You need a first aid kit to revive (1 = yes, 0 = no)
BTC_pvp = 1; //(disable the revive option for the enemy)
BTC_injured_marker = 1;
BTC_vehs_mobile_west = [car11];//Editable - define mobile west
BTC_vehs_mobile_east = [mobile_east_0];//Editable - define mobile east

So I am assuming this would determine depending on what player slot chosen upon entering the server would allow for reviving other fallen teammates. Or could be class name of the medic class. correct?

Share this post


Link to post
Share on other sites

The injured markers are not showing on the map, I think it is conflicting with another script (Player Markers) that I use... :confused: :confused: :confused:

Share this post


Link to post
Share on other sites

Giallustio can you help me.

Im trying to make it so the player can be revived upon being downed but cannot respawn at the base marker for 2 minutes. I thought the BTC_revive_time_min & max would do this but it doesn't seem to be working, am i correct in assuming that these should do what I want?

Share this post


Link to post
Share on other sites

I'll add it in the next version!

In the meantime:

Add this line in the =BTC=_revive_init.sqf:

BTC_respawn_time    = 120;

Change the BTC_player_respawn fnc in the =BTC=_functions.sqf:

BTC_player_respawn =
{
player setVariable ["BTC_need_revive",0,true];
player setPos getMarkerPos BTC_respawn_marker;
sleep 1;
player setDamage 0;
player switchMove "amovpercmstpslowwrfldnon";
player switchMove "";
player enableSimulation false;
player enableSimulation true;
if (BTC_respawn_time > 0) then
{
	if (BTC_black_screen == 0) then {titleText ["", "BLACK OUT"];};
	sleep 1;
	private ["_n"];
	for [{_n = BTC_respawn_time}, {_n != 0}, {_n = _n - 1}] do
	{
		private ["_msg"];
		titleText [format ["Respawn in %1",_n], "BLACK FADED"];
		sleep 1;
	};
};
if (BTC_black_screen == 1 && BTC_respawn_time == 0) then {titleText ["", "BLACK IN"];};
};

Not tested! Let me know if it works ;)

Share this post


Link to post
Share on other sites

Can't test it until tonight as im at work but even if it doesn't work thanks for taking the time Giallustio, its massively appreciated!

Ill get back to you when i've tried it.

Share this post


Link to post
Share on other sites

Hey.

No joy im afraid. Some very odd behaviour. I can immediately press respawn and i come back to life, however my screen goes black and I get a respawn countdown although im alive as i can hear my footsteps as I move.

Any ideas?

Share this post


Link to post
Share on other sites

Ah yep!

I forgot to stop the player.

Hey.

however my screen goes black and I get a respawn countdown

It's the countdown you asked for, or i don't understand your request...

Share this post


Link to post
Share on other sites

Yeah the countdown is what I want, the problem is the player is alive again, just blind for 2 minutes :D

Share this post


Link to post
Share on other sites
just blind for 2 minutes :D

Not that alive then ;)

Try this one by the way:

BTC_player_respawn =
{
player setVariable ["BTC_need_revive",0,true];
player setPos getMarkerPos BTC_respawn_marker;
sleep 1;
player setDamage 0;
player switchMove "amovpercmstpslowwrfldnon";
player switchMove "";
player enableSimulation false;
player enableSimulation true;
if (BTC_respawn_time > 0) then
{
	if (BTC_black_screen == 0) then {titleText ["", "BLACK OUT"];};
	private ["_obj"];
	_obj = "Land_Bucket_F" createVehicleLocal (player modelToWorld [0,0,-2]);
	player attachTo [_obj, [0, 0, 6000]];
	sleep 0.1;
	player enableSimulation false;
	sleep 1;
	private ["_n"];
	for [{_n = BTC_respawn_time}, {_n != 0}, {_n = _n - 1}] do
	{
		private ["_msg"];
		titleText [format ["Respawn in %1",_n], "BLACK FADED"];
		sleep 1;
	};
	player enableSimulation true;
	deTach player;
	player setVelocity [0,0,0];
	player setPos getMarkerPos BTC_respawn_marker;
	deleteVehicle _obj;
};
if (BTC_black_screen == 1 && BTC_respawn_time == 0) then {titleText ["", "BLACK IN"];};
};

Share this post


Link to post
Share on other sites

That appears to do the job!

There are still some peculiar things going on though they are by no means game breaking.

When the player dies he has a brief image of the sky (or under the map?)

Also when the timer ends, it remains at 1 for a 3/4 seconds and other players on the server hear a very strange noise almost like a train running along tracks in the distance.. I dunno how to explain it better then that, its very odd :D Anyway, when the player respawns it ends.

I dont expect you to fix these things though buddy, i've already taken more then enough of your time. Just giving you a heads up incase you use this method in your next version.

Thanks for helping me with this.

Share this post


Link to post
Share on other sites

Great work! The revive and stuff works.

I only have one issue, the player loses gear when he is "killed" or when he respawns. Although I was using VAS script as well, I removed it, still running Revive, players loses his gear. Remove both scripts, works fine, respawns with gear (although with the default one). Added VAS back on, player still respawns with gear. So it probably is this scripts issue.

Any ideas, solutions?

Thanks in advance

Edited by pero2589

Share this post


Link to post
Share on other sites
Great work! The revive and stuff works.

I only have one issue, the player loses gear when he is "killed" or when he respawns. Although I was using VAS script as well, I removed it, still running Revive, players loses his gear. Remove both scripts, works fine, respawns with gear (although with the default one). Added VAS back on, player still respawns with gear. So it probably is this scripts issue.

Any ideas, solutions?

Thanks in advance

Interesting. I am using the VAS with this as well and when I die, I lost nothing. I respawn with what I had at time of death. I actually would like the option to lose all gear when respawned.

Here is a copy of my Init.Sqf. Maybe this will help you.



removeAllWeapons player;
removeallassigneditems player;
Removeuniform player;
Removevest player;


execVM "grenadeStop.sqf";
execVM "fillammobox.sqf";


call compile preprocessFile "=BTC=_TK_punishment\=BTC=_tk_init.sqf";
call compile preprocessFile "=BTC=_revive\=BTC=_revive_init.sqf";

---------- Post added at 05:06 PM ---------- Previous post was at 05:02 PM ----------

Has anyone got Mobile Respawn to work fully?

I just now got it semi working.

Im still unable to actually respawn on the mobile respawn.

So the vehicle that I am using for the mobile respawn is a unarmed Hunter and Ifrit.

As of right now, when the mission starts, I get the notification Mobile Respawn is available.

It also respawns as normal when destroyed and displaying correct messages.

The only problem that remains is I am unable to respawn on the vehicle once killed out in the field.

I can only spawn back at main base.

Any got any solutions.

Edited by BloodxGusher

Share this post


Link to post
Share on other sites

Thx for the code Giallustio. Quick question. I disabled mobile respawn and set respawn type to Instant. In this case, you respawn into the ocean. I was wondering if Base respawn is the only type that can be used with this.

Share this post


Link to post
Share on other sites

So I've just noticed while playing a few minutes ago on a co-op mission with some guys from my unit, that my version of the Alpha has been updated to 0.11.103003 (I'm opted in for new builds on steam)

This update seems to have stopped the revive side of the script from work, instead respawning you with default gear at the Respawn_west marker. Just thought I'd give you some notice in case it's something you can adapt in the script.

Share this post


Link to post
Share on other sites

Got it working and works with players fine. Tho mate whos trying it seems to have revives not work after a certain amount of deaths tho could be the config if theres a toggle for amount tho wasnt sure there was one.

But yeah got it fine on my end. :) Thank you for the script sir.

Share this post


Link to post
Share on other sites

Hi, Many thanks for all your work - really useful module.

Little 'bug' I think we found last night.

Have created a coop mission and found that if near a vehicle when dead you can roll to it, get inside and use mounted guns etc as tho still concious.

also the hact that you can roll means easy for injured players to roll into cover which negates teamate need to drag bodies to cover before first aid.

Is this something that can be fixed?

Share this post


Link to post
Share on other sites

Got it working and works with players fine. Tho mate whos trying it seems to have revives not work after a certain amount of deaths tho could be the config if theres a toggle for amount tho wasnt sure there was one.

But yeah got it fine on my end. Thank you for the script sir.

I hope there can be a option available for this.

i, Many thanks for all your work - really useful module.

Little 'bug' I think we found last night.

Have created a coop mission and found that if near a vehicle when dead you can roll to it, get inside and use mounted guns etc as tho still concious.

also the hact that you can roll means easy for injured players to roll into cover which negates teamate need to drag bodies to cover before first aid.

Is this something that can be fixed?

I have noticed that as well.

One suggestion to the creator could be to use the "disableUserInput" command or maybe limit moving of only the head like in some other mods.

Share this post


Link to post
Share on other sites

One suggestion to the creator could be to use the "disableUserInput" command.

Not a great idea...Too strong. I used "enablesimulation" in the previous version but u can't turn your head around, and i like this feature. I gotta think about it.

@ShadowEye2099

I don't use beta, so i can't help you, but thank you for the report!

Share this post


Link to post
Share on other sites
Not a great idea...Too strong. I used "enablesimulation" in the previous version but u can't turn your head around, and i like this feature. I gotta think about it.

Ah ok.

Question:

Does the mobile respawn work for you?

When I start my missions, I get the notification of the Mobile Respawn being available and when its destroyed but I can not respawn on it when I am killed. I believe I followed your instructions fully. I placed down a marker named blufor and opfor and created a object(checkered flag) named BTC_base_flag_west and BTC_base_flag_east. I also have markers named respawn_west and respawn_east. The mobile respawn vehicles are named mobile_west_0 and mobile_east_0 in the editor. Naming the the mobile respawn vehicles anything else other than mobile_west_0 OR mobile_east_0, does not activate the vehicle.

Is there something I am doing wrong?

Also. Is it possible to respawn with out weapons after death?

Share this post


Link to post
Share on other sites

I want to use this but without the respawn. I want to make it so that it becomes a necessity for people to carry medkits and heal each other, rather than if someone dies then you just have to wait.

Share this post


Link to post
Share on other sites

Im using this in zorros DWS mission and hes got the teleport option added to a portapotty. It runs fine at start but after 5-6 hours we lose the option to teleport. Respawning the mhq does nothing. Or if someone blows the magicjohn up we lose it too. The pp is still there as it is set to allowdamage false but the option still goes away. Is there anything that I could do to ensure the teleport wont be lost?

Share this post


Link to post
Share on other sites

yea for anyone unaware you can NEVER test respawning in the editor this is something that goes way back, team switch is available in editor even when the respawn type is not set to team switch.

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

×