Jump to content
Sign in to follow this  
norrin

SQF revive script

Recommended Posts

Hmmm after respawning the ActsPpneMstpSnonWnonDnon_Injured2 isn't good. The player is lying too long. Guess the old anim has to stay there after respawning at a marker.

Does anyone know where the animations are that will be started after respawning at a respawn marker and after getting revived? I'm up to some try and error tests but a quick answer could spare some time smile_o.gif

Edit:

Never mind, I finally found it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> //move body

NORRN_X_respawn = true;

waitUntil {alive player};

_name = player;

_name playMove "AmovPpneMstpSnonWnonDnon_healed";

sleep 0.5;

Line 186 to 191 of r_killedhandler.sqf have to stay untouched. Otherwise it'll take a very long time until the player can move again.

Edit2:

Now you can watch the final modification here. I've added the grouplink voice array so the injured player will shout out more things.

Edit3:

Ok, revive works, drag & drop and respawning at the markers works as well. The only thing I'll have to fix is to put in the old animation after a player is revived by somebody. It's definately not good to replace all animations.

Share this post


Link to post
Share on other sites

What, you're telling me you don't like the bobbing head animation  tounge2.gif

Looks good mate smile_o.gif

Legislator can you send me the final version that you've changed so I can check out what you've done and add it the next release (edit: no longer needed see below).

PS: Almost got the player mobile spawn fixed just need to do some more checking - its been a little more complicated that I first thought unfortunately.

Just to clarify is this a QG animation or a standard ArmA anim?

EDIT: _xeno can you please correct me if I'm wrong but I think an addon revive is only good if you basically want to use the same revive settings in all of your missions, which may not be what you're after Legis.

EDIT EDIT:  I've fixed the player mobile spawn and have the new animation implemented and it seems to be working in vanilla arma ie. if I load arma without queens gambit.

Can some one please confim this - you can get the modified version here: http://home.iprimus.com.au/simonns....tro.rar

Share this post


Link to post
Share on other sites

As you can see the Bohemia Wiki the animation is Queens Gambit content. I don't know what happens if the player has no QG installed. Maybe there should be an option which animation to be used.

As far as I understood only the folder revive and spect are in the server side addon. The revive_init.sqf is still within the mission folder and only the path to the revive code has to be changed. This way every mission can be set with random parameters. Tomorrow I'll try to figure out how to set this. If I don't get it, Xeno must help me biggrin_o.gif

One thing is sure ... You can't use AI Disabled and AI Enabled within the same server side addon sad_o.gif

Share this post


Link to post
Share on other sites

Mate I have already checked the Biki.  What I need to know is if someone hasn't got QG and reads this can they please check the test mission in this link: http://home.iprimus.com.au/simonns....tro.rar

I have QG installed but if I load ArmA without using the QG mod switch the new animation works.  I'm not sure whether this is occurring because QG makes some changes to the basic ArmA content or whether the animation still works if QG hasn't been installed.

Share this post


Link to post
Share on other sites

One thing is sure ... You can't use AI Disabled and AI Enabled within the same server side addon  sad_o.gif

Should be doable. Just rename the folder for the AI Enabled version to revive_sqfAI (or whatever you like) and update the paths in the AI Enabled scripts and dialog files.

Xeno

Share this post


Link to post
Share on other sites

@_xeno - if you're happy to do this and have time can you please post the method for creating an addon version of the script because as you say this would be tremendous boon for any clans like Legislator's GLT out there that have an enormous back log of revive missions to update.

However, its also important to me that the script can be used without any mods or addons installed so that anybody can play missions that use it on a public server so I'm going to keep releasing non-addon versions - hopefully if there aren't any more bugs or requested features this may be the last.

Also just checked and the new unconscious animation also works in VBS2 so it makes me think that it may not be QG specific.

PS: In the test mission (link a couple of posts back) for the player mobile spawn to work a player is going to have to use the medic position at mission start.

Share this post


Link to post
Share on other sites

The funny thing is that I found this animation while checking all avaiable animations for my video project. I found some really cool things and it's a shame that they're not used by the AI in combat. I know there's one suppressive fire addon that changes the animations but somehow it caused a deep impact in fps.

It's a little bit offtopic, but check this out. Place a soldier and call it Test. Then create a trigger and put this in the activation line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

Ex1 = "M_Sidewinder_AA" createVehicle [(getpos Test select 0), (getpos Test select 1), 0]; Test setVelocity [5,5,15]; Test switchmove "AmovPercMstpSlowWrflDnon_ActsPpneMstpSlowWrflDr_GrenadeEscape";

An explosion appears, the unit is thrown through the air with the proper animation for it biggrin_o.gif This may be cool for some cutscenes or maybe even for hard ingame combat?

Share this post


Link to post
Share on other sites

Hi men!!!

i´m trying to implement the script to a mission made with mod FFAA (spanish army mod) but i have a problem.

The action revive do not seems to appear when friendly soldier dies!!!

I´ve been trying changing the name of the units that can be revived with the ones of the mod, an nothing I put the revive init for if you can help me.

Quote[/b] ]/*

REVIVE SCRIPT - AI disabled

Creates playable units that fall unconcious when killed which can then be revived

MARCH 2008 - norrin (norrins_nook@iprimus.com.au)

Revised by Xeno (www.germany-fun.de)

Additional revive functions by HulkingUnicorn and alef

Version: 1.46 (Revivable Players - AI disabled)

******************************************************************************************

*************

Special thanks to HulkingUnicorn and MCPXXL for their scripting advice, testing and many suggestions

Many thanks also to satexas69, SNKMAN, sickboy, vengeance1 (JAAF), Legislator, alef

and Raedor for all their suggestions, advice and support and to all at the BIS forums.

Based on concepts by PRiMe, toadlife and Mongoose_84. Also thanks to Chris'OFP editor.

Some of the voice arrray stuff stolen with the permission of SNKMAN from ArmA Group Link II Plus!

And of course thanks to Kegetys for his amazing spectating script and to ViperMaul for his script fix

Last but not least to Foxhound and ArmAholic for their great support and providing mirrors for all my scripts

------------------------------------------------------------------------------------------

-------------

See release notes for details on incorporating revive scripts in your missions

******************************************************************************************

**************

Start revive_init.sqf

*/

//Init.sqf settings for revive_player scripts by norrin

// ====================================================

ScopeName "NORRN_r_init";

if (!requiredVersion "1.09") exitWith {hint "Wrong game version for revive"};

if (isServer) then {NORRN_list = []};

//sickboy's code modified by _xeno

T_INIT = false;

T_Server = false;

T_Client = false;

T_JIP = false;

T_MP = (if (playersNumber east + playersNumber west + playersNumber resistance + playersNumber civilian > 0) then {true} else {false});

if (isServer) then

{

T_Server = true;

if (!isNull player) then {T_Client = true};

T_INIT = true;

} else {

T_Client = true;

if (isNull player) then

{

T_JIP = true;

[] spawn {waitUntil {!isNull player};T_INIT = true};

} else {

T_INIT = true;

};

};

waitUntil {T_INIT};

//Configurable revive script options (Off = 0, On = 1)

// ====================================================

_NORRN_mission_end_function = 0; //array no.0

_NORRN_reward_function = 0; //array no.1

_NORRN_team_kill_function = 0; //array no.2

_NORRN_all_dead_dialog = 0; //array no.3

_NORRN_JIP_spawn_dialog = 0; //array no.4

_NORRN_nearest_teammate_dialog = 1; //array no.5

_NORRN_unconcious_markers = 1; //array no.6

_NORRN_follow_cam = 1; //array no.7

_NORRN_call_out_function = 1; //array no.8

_NORRN_revive_timer = 1; //array no.9

_NORRN_heal_yourself = 0; //array no.10

_NORRN_kegetys_spectator = 1; //array no.11

_NORRN_water_dialog = 1; //array no.38

_NORRN_unconscious_drag = 1; //array no.47

//list of playable units

// ====================================================

NORRN_player_units = ["alpha_1","alpha_2","alpha_3","alpha_4","alp

ha_5","alpha_6","alpha_7","alpha_8","alpha_9"

,"alpha_10","alpha_11","alpha_12"];

//This next line can be commented out or removed if it

//interferes with intro movies

// ====================================================

titleText ["viveres", "BLACK FADED", 0.2];

// no of respawn points, spawn position names for

//respawn and the time before the respawn dialog appears

//for JIP players - Option to make base_1 respawn possible

//even if enemy forces are within 50 metres (options OFF = 0, ON = 1)

// =====================================================

_NORRN_no_respawn_points = 2; //array no.12

_NORRN_Base_1 = "Mobile"; //array no.13

_NORRN_Base_2 = "West_spawn1"; //array no.14

_NORRN_Base_3 = ""; //array no.15

_NORRN_Base_4 = ""; //array no.16

_NORRN_time_b4_JIP_spawn_dialog = 10000; //array no.17

_NORRN_Base_1_respawn = 0; //array no.18

_NORRN_mobile_spawn = 1; //array no.51

_NORRN_mobile_base_start = "Base"; //array no.52

if (isServer && _NORRN_mobile_spawn == 1) then {NORRN_camo_net = false; publicVariable "NORRN_camo_net"};

if (_NORRN_mobile_spawn == 1) then {r_ms_base_1 = _NORRN_Base_1};

//The can_revive variable can be changed if for example

// you only one sort of unit to be able to revive eg. "soldierWMedic"

//The can_be_revived variable can be changed if you want

//to use these scripts for a different side

// =====================================================

_NORRN_can_revive = "ffaa_im_Medico_TP"; //array no.19

_NORRN_can_revive_2 = ""; //array no.20

_NORRN_can_be_revived = "soldierGB"; //array no.21

_NORRN_can_be_revived_2 = ""; //array no.22

//No of Enemy sides (0, 1 or 2). Enemy sides can be "EAST",

//"WEST","RESISTANCE" etc

// ======================================================

_NORRN_no_enemy_sides = 1; //array no.23

_NORRN_enemy_side_1 = "EAST"; //array no.24

_NORRN_enemy_side_2 = ""; //array no.25

//Friendly sides. These next options are linked to the camera script and

//allow the players to spectate other team members and friendly sides

//while unconscious. Friendly sides can be "EAST", "WEST","RESISTANCE" etc.

//If all players are from the same side make sure you set the same side

//for both variables eg "WEST", "WEST" ie do not leave these variables blank

//if using the follow cam option (//array no.7)

//=======================================================

_NORRN_allied_side_1 = "WEST"; //array no.40

_NORRN_allied_side_2 = "WEST"; //array no.41

//Maximum number of revives per unit - adjust to whatever

//value you like and the unit's level of damage following revive

//Whether you want to use HulkingUnicorn's script that does not allow the

//player to stand until after he has been healed by a medic

// ======================================================

_NORRN_max_respawns = param2; //array no.26

_NORRN_revive_damage = 0.8; //array no.39

_HULK_rProne = 1; //array no.43

//Time until respawn button appears (0 = approx. 12 seconds)

//Set to a high number like 100000 seconds if you do not want

//to use this option

// ======================================================

_NORRN_respawn_button_timer = 0; //array no.27

//If the closest friendly unit is further

//than this distance away trigger respawn dialog

// ======================================================

_NORRN_distance_to_friend = 250; //array no.28

//Number fo the revives required for bonus

// ======================================================

_NORRN_revives_required = 1; //array no.29

//Number of teamkills before punishment

// ======================================================

_NORRN_no_team_kills = 1; //array no.30

//Choose what type of respawn option for the revive_timer

//function: 0 = dead or 1 = spawns at base (NORRN_respawn_position = 0)

//or the closest enemy free respawn point to where the player died

//NORRN_respawn_positon = 1) or player's choice of free respawn point

//NORRN_respawn_positon = 2) When using the revive_timer function

//the length of time before the unconscious player is declared dead

//or respawns. Also you have the option of viewing a revive count down

//timer

// ======================================================

_NORRN_revive_timer_type = 1; //array no.31

_NORRN_respawn_position = 1; //array no.32

_NORRN_revive_time_limit = 180; //array no.33

_NORRN_visible_timer = 1; //array no.42

//Number of heals that each player gets during a mission

//The damage level range between which the heal action becomes available

//=======================================================

_NORRN_no_of_heals = 1; //array no.34

_NORRN_lower_bound_heal = 0.1; //array no.35

_NORRN_upper_bound_heal = 0.7; //array no.36

//This sets the distance that you wish the unconscious

//follow cam to follow other team members. Follow_cam_team allows

//you to specify whether the unconscious cam follows all friend units(0)or

//just those that are define by the NORRN_player_units array (1)

//=======================================================

_NORRN_follow_cam_distance = 250; //array no.37

_NORRN_follow_cam_team = 0; //array no.44

//If _NORRN_rejoin_punish is set to 1 players who

//quit then rejoin the server to avoid waiting to be revived

//will rejoin the server with _NORRN_rejoin_punish_revives

//lives. If _NORRN_rejoin_punish_system = 0 player receives

//_NORRN_rejoin_punish_revives each time he rejoins, if it equals 1

//then player spawns as a seagull if he rejoins a second time

//========================================================

_NORRN_rejoin_punish = 1; //array no.45

_NORRN_rejoin_punish_revives = 3; //array no.46

_NORRN_rejoin_punish_system = 1;

//========================================================

//Additional revive functions with many thanks to alef (0 - off, 1 - on except for _NORRN_bury_timeout)

_NORRN_drop_weapons = 1; //array no.48, Should the respawned player drop his weapons where he died?

_NORRN_cadaver = 0; //array no.49, Should the respawned player's body remain there?

_NORRN_bury_timeout = 120; //array no.50, If drop weapons OR player body, how long before the body is buried?

// 0=maximum (1200s) , n=seconds up to 1200s (hard coded)

//========================================================

//Code for punishing rejoining players

_r_units = [];

{call compile format ["_r_units = _r_units + [%1]", _x]} forEach NORRN_player_units;

if (_NORRN_rejoin_punish == 1 && player in _r_units) then

{

_zzz = 0;

if (_NORRN_rejoin_punish_system == 0) then

{

if ((name player) in NORRN_list) then

{

_NORRN_max_respawns = _NORRN_rejoin_punish_revives;

};

[0] execVM "revive_sqf\rejoin.sqf";

}else{

{if ((name player) == _x) then {_zzz = _zzz + 1}}forEach NORRN_list;

if (_zzz == 0) then {[0] execVM "revive_sqf\rejoin.sqf";};

if (_zzz == 1) then

{

_NORRN_max_respawns = _NORRN_rejoin_punish_revives;

[1] execVM "revive_sqf\rejoin.sqf";

};

if (_zzz > 1) then {[player, player, "null"] execVM "spect\specta.sqf"; breakout "NORRN_r_init"};

};

};

//========================================================

//User code - eg. NORRNCustonexec1="execvm ""myscript.sqf"";hint ""myoutput"";"

//Exec1 occurs following being revived

//Exec2 occurs when you team kill

//Exec3 occurs when you spawn at base

//Exec4 occurs when you try and spawn at base but it is still occupied

NORRNCustomExec1="";

NORRNCustomExec2="";

NORRNCustomExec3="";

NORRNCustomExec4="";

NORRNCustomExec5=""; //Must use variables: MAP_r_rejoin (false - first time,

//true - rejoining the server, and

//MAP_r_no_lives - number of lives if you rejoin server)

//========================================================

NORRN_revive_array = [];

NORRN_revive_array = [_NORRN_mission_end_function,_NORRN_reward_function, _NORRN_team_kill_function, _NORRN_all_dead_dialog, _NORRN_JIP_spawn_dialog,

_NORRN_nearest_teammate_dialog, _NORRN_unconcious_markers, _NORRN_follow_cam, _NORRN_call_out_function, _NORRN_revive_timer,

_NORRN_heal_yourself, _NORRN_kegetys_spectator,_NORRN_no_respawn_points,_NORRN_Base_1,_NORRN_Base_2,_NORRN_Base_

3,_NORRN_Base_4,

_NORRN_time_b4_JIP_spawn_dialog,_NORRN_Base_1_respawn,_NORRN_can_revive,_NORRN_can_r

evive_2,_NORRN_can_be_revived,

_NORRN_can_be_revived_2,_NORRN_no_enemy_sides,_NORRN_enemy_side_1,_NORRN_enemy_side_

2,_NORRN_max_respawns,_NORRN_respawn_button_timer,

_NORRN_distance_to_friend,_NORRN_revives_required,_NORRN_no_team_kills,_NORRN_revive

_timer_type,_NORRN_respawn_position,

_NORRN_revive_time_limit,_NORRN_no_of_heals,_NORRN_lower_bound_heal,_NORRN_upper_bou

nd_heal,_NORRN_follow_cam_distance,

_NORRN_water_dialog, _NORRN_revive_damage, _NORRN_allied_side_1, _NORRN_allied_side_2, _NORRN_visible_timer, _HULK_rProne,

_NORRN_follow_cam_team, _NORRN_rejoin_punish, _NORRN_rejoin_punish_revives,_NORRN_unconscious_drag, _NORRN_drop_weapons,

_NORRN_cadaver,_NORRN_bury_timeout,_NORRN_mobile_spawn,_NORRN_mobile_base_start];

//Initialise isplayer script

if (player in _r_units) then {[] execVM "revive_sqf\revive_init.sqf"};

//Initialise isplayer script

[NORRN_player_units] execVM "revive_sqf\isplayer.sqf";

if (isServer) then

{

//Initialise mission end script

if (_NORRN_mission_end_function == 1) then {[NORRN_player_units] execVM "revive_sqf\mission_end.sqf"};

//Initialise marker color script

if (_NORRN_no_enemy_sides > 0) then {[] execVM "revive_sqf\marker_color.sqf"};

};

if (true) exitWith {};

well those are the names of the units that appear in the mission as the players:

ffaa_im_Soldado_TP,

ffaa_im_Observador_TP,

ffaa_im_Ingeniero_TP,

ffaa_im_Oficial_TP,

ffaa_im_Contracarro_TP,

ffaa_im_Medico_TP,

ffaa_im_SubOficial_TP,

ffaa_im_Contracarro_TP,

ffaa_im_Ametrallador_TP,

ffaa_im_Francotirador_P_TP,

I want only allow the medic to revive the other players!!!

(ffaa_im_Medico_TP,)

thanks for all

Share this post


Link to post
Share on other sites

I'm using this for the FFAA insurgents:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_NORRN_can_revive = "soldierEB"; //array no.19

_NORRN_can_revive_2 = ""; //array no.20

_NORRN_can_be_revived = "soldierEB"; //array no.21

_NORRN_can_be_revived_2 = ""; //array no.22

and it works fine.

Share this post


Link to post
Share on other sites

I've had quick look at the config of these units and you may not be able specify medic only revive with this addon.

Firstly try this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_NORRN_can_revive = "soldierGB"; //array no.19

_NORRN_can_revive_2 = ""; //array no.20

_NORRN_can_be_revived = "soldierGB"; //array no.21

_NORRN_can_be_revived_2 = ""; //array no.22

and check that you can revive with any of the FFAA units.  Then try this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_NORRN_can_revive = "soldierGMedic"; //array no.19

_NORRN_can_revive_2 = ""; //array no.20

_NORRN_can_be_revived = "soldierGB"; //array no.21

_NORRN_can_be_revived_2 = ""; //array no.22

If this doesn't work I think its because all the FFAA Spanish Marine units are config'd as general guerilla units ie. soldierGB

Share this post


Link to post
Share on other sites

The AI Disabled 1.49g works perfect! smile_o.gif No errors, no problems. But I did one tiny change. I've changed the marker of died players to _mrkr setMarkerType "DestroyedVehicle"; which was introduced in ArmA 1.14 and set the markersize to 1 again.

Share this post


Link to post
Share on other sites
The AI Disabled 1.49g works perfect! smile_o.gif No errors, no problems. But I did one tiny change. I've changed the marker of died players to _mrkr setMarkerType "DestroyedVehicle"; which was introduced in ArmA 1.14 and set the markersize to 1 again.

Fewww that's a relief - mate every time I see you have a new post I'm terrified that you've found a new bug. smile_o.gif

I'll try out the new marker type you've suggested tonight and update the script and get it posted properly.

The new animation you suggested is great, still don't know if it works for players that only have vanilla ArmA though. Anyway you should see it with the drag function and animations in VBS2 - it'll make you weep - if I get a chance tonight I might even make a short movie so you can see it in action.

Thanks again for all your beta testing and time,

norrin

Share this post


Link to post
Share on other sites

lol biggrin_o.gif Most bugs appear when lot's of players using the revive script doing the craziest things, like dying in a harrier while refueling at a civilian fuel station tounge2.gif You should try the voice array of Grouplink with your revive script. That's kind of funny when all players are screaming on the ground. You'll find them easier, especially if they're wounded ghilie soldiers. Guess we can concentrate on AI Enabled now.

Too bad I don't have VBS 2 sad_o.gif I hope there'll be a good animation pack for ArmA in the near future.

I'm still having some problems setting up the server-side revive script. ArmA.rpt shows this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Warning Message: Script glt_misc\revive_sqf\revive_init.sqf not found

Warning Message: Script glt_misc\revive_sqf\isplayer.sqf not found

Warning Message: Script glt_misc\revive_sqf\marker_color.sqf not found

I've altered every link to \glt_misc\.... but these 3 links are the only one's that'll not to be found crazy_o.gif

Share this post


Link to post
Share on other sites
Yup, disableAnim is fine, tested it a few seconds ago... I'm glad that I put the revive script into an addon so that I do not have to change tons of missions again.

Xeno

@_Xeno_

I would also love to know how to do this.  I am forever modifing cutting and pasteing and always messingup my cut and pastes maintaining my missions.

Pretty please with loads of bullets on top?

Thanks

@norrin your work for the community is awesome.  Thanks.

Styxx

Share this post


Link to post
Share on other sites

hi all

norrin you have helpt me alot thanks

i have one last request for the pvsp revive script

a mini map in the corner:)

if you dont like to add that its ok

if not is there anyone that can script one for me

i guess it alot of work

thats all i ever need in my revive life:)

thanks all

black

Share this post


Link to post
Share on other sites

Update AI_disabled revive version 1.49h

Get it here: http://home.iprimus.com.au/simonns....tro.rar

Fixed

* player mobile spawn units (NB: A player must take this role at mission start for this function to work properly but it now no longer matters if he quits the mission for what ever reason)

Changes

* Further revisions to the code to remove replication

* New animation for unconscious units (NB: I'm not sure this will work with vanilla ArmA if Queen's Gambit is not installed)

* New markers used for unconscious units on the in game map

Note

Unless you want to use the player mobile spawn option or the new animations there is no real need to update with the latest version of the script

@Morgan - mate for the minimap do you mean while the player is unconscious and viewing other players with the camera

Share this post


Link to post
Share on other sites

its more like a mini map when you are alive so you can see

close friends, or maby dead soldiers that needs to be revived.

so you dont need to toggle the m key.like gps map

but smaller.like this one when jumping out in para

http://www.ofpec.com/forum....ch=2586

this one is just right but more in a corner

and shown all time (if you ever doing this is there any way of

making it a seperat script so can be used with any map

maby post as a mini map script at armaholic)

must funktion in pvsp revive

Share this post


Link to post
Share on other sites

Norrin, you don't wanna hear this, but I found something crazy_o.gif I guess most bugs appear with lots of players.

Check this picture out. Is the error message related to your script? I've searched your code but the only relation I found was in drog.sqf line 23 _wep = weapons _body;

This error message appeared from the very beginning and disappeared after 1,5 hours after killing an enemy infantry unit. So I really don't know if it's related to your script.

Still there are some issues when dying in explosions. 2 players got kicked out of the revive script and spawned at respawn_east. Reviving their fake bodys solved the problem.

Ah and as you see on the picture my drag action menu entry didn't disappear. I dragged a player and got shot. I guess it's hard to provoke this bug again because this is the first time it happened while getting killed during a drag operation.

Edit:

Today we played the same mission again with 6 players. The error message didn't show up again. I guess it was a grouplink issue. smile_o.gif But it is proofed that player dying in an explosion while sitting in a car are kicked out of the revive script and be transported to respawn_east. And again, hitting ESC + Respawn + normal reviving solved the issue.

Share this post


Link to post
Share on other sites

Yeah I can confirm the first error has nothing to do with the revive script.

But it is proofed that player dying in an explosion while sitting in a car are kicked out of the revive script and be transported to respawn_east. And again, hitting ESC + Respawn + normal reviving solved the issue.

I've tried it with version 1.49h and a couple of players and it seems to work fine.  How many players on the server, how many players dying in the vehicle at the same time are you talking about and what type of vehicle was it?  Maybe send me the mission so I can see what happens in your set-up.It sounds like the respawn camera is not working in this instance.

Share this post


Link to post
Share on other sites

Hi

I'm modifying Domination Revive, and want to implement som additional functionality to the medics and their equipment. The idea is for players to have actions added or removed depending on if they are close enough to a medic, m113 ambulance, mash etc. When close, an action lets them refill the heals to the number set in the array.

What I have so far is the following. The function is defined in x_playerfuncs.sqf within Domination, the action stuff is done in revive\player_heal.sqf.

x_playerfuncs.sqf

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

x_medfunc =

{

private ["_objs"];

   if ((vehicle player) == player) then

   {

       _objs = nearestObjects [player,["M113Ambul","SoldierWMedic","USMCD_Soldier_Med","MASH"],5];

       if (count _objs > 0) then

       {

           objectID3 = _objs select 0;

           if (alive objectID3) then

           {

               true

           }

           else

           {

               false

           };

       }

       else

       {

           false

       };

   }

   else

   {

       false

   };

};

player_heal.sqf, main loop

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

if (!(typeOf player in d_medic)) then

{

   if (call x_medfunc) then

   {

       if (!_medadded) then

       {

           actionID3 = player addAction ["Refill Medpacks", "bat\file.sqf", [objectID3], -1, false];

           _medadded = true;

       };

       //_no_heals_remaining = NORRN_revive_array select 34

   }

   else

   {

       if (_medadded) then

       {

           player removeAction actionID3;

           _medadded = false;

       };

   };

}

else

{

   _no_heals_remaining = NORRN_revive_array select 34;

};

Stuff is being initialized and declared in init.sqf and top of script.

Now, I'd like to keep it "simple", and not use a separate script, and instead use some "format magic" within the addAction statement (see the commented line).

Is it possible to make addAction perform the commented line instead of starting a script, using the local variables that this script is using?

If not, how would you suggest I proceed?

Note that both the Domination and Revive scripts are way too complex for my regular understanding, so I'm not able at all to re-implement latest edition of Revive into Domination. I have to work with what I've got, which is Domination v3.02.

Any clues?

Share this post


Link to post
Share on other sites

Hiya Carl,

Just to let you know _xeno uses his own modified version of the revive which is based off a slightly earlier version of the script so I don't have his latest version in front of me just at the moment.

I'd do it things a little bit differently to the way you're trying to set it up. In the past I've made a version of the medic only revive whereby any non-medic player that was adjacent to a MASH tent could revive unconscious players if they dragged them along side.

To do this I added the action through the revive_Player.sqf and I reckon that this is probably your best bet here. So you'd do a check to see if the player was next to a medic or MASH tent etc and then add the actions, if the player then moved further than x metres away or was killed you'd remove the actions.

As this is a looping script you'll need to keep a counter variable as well such as "_c" so that the the actions aren't added multiple times when you move close to the target. Have a look at the revive_player.sqf and see how how I add the revive and drag actions for details.

If you're still having problems send me details on exactly how you want it set up and I'll add the necessary code to the revive_player.sqf. You can then write the code for the actions yourself.

Best wishes,

norrin

PS. Thanks for the mirror Imutep smile_o.gif

Share this post


Link to post
Share on other sites

As Always NORRIN, thanks for all your hard work and the updating of the Script!

We Appreciate it! notworthy.gif

Share this post


Link to post
Share on other sites

Hi Norrin

1.49h

I want to report that if I crash a helicopter at high speed into the ground. (which seems to happen alot. My Nic name has become TC from Magnum P.I.)

I die in a flaming wreck and I end up floating in the water. Some times I have the option to float to shore. I click that button and then when I hit land (Which takes a few minutes to float there I get the option to respawn at the two designated spots.

Other times I am in a cyclical black screen where I hear the water, but just die over and over. Esc, abort and JIP into another soldier fixes the issue.

I have been testing all week with a dedicated server (Windows) and two active players to test. It has happened a few times over the week of testing to both of us. `

I have been killed a lot by bullets during these tests. even got the other guy to kill me repeatedly and the script works fine.

It seems like for me it is helo's in a fiery explosion that cause this weird occurrence.

I am having a LAN party this weekend (7 guys) so I will let you know how we make out.

This script makes the game so much better for a group that just wants to PLAY at war and not re-live it in it's finality.

Thanks for all your hard work.

Styxx

Share this post


Link to post
Share on other sites

Hmm Norrin, I guess there is another issue sad_o.gif I've noticed it in 1.47 and 1.49. After getting the respawn buttons the spectating camera can't be used anymore.

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  

×