Jump to content

Recommended Posts

Sry Norrin,

the new version doesnt work with reviving for me.

Dunno if i use wrong settings:

Here is my revive.sqf

// GENERAL REVIVE OPTIONS  (Off = 0, On = 1)
_mission_end_function 			= 1;				//array no.0  - mission ends when all players are unconscious
_call_out_function 				= 1;				//array no.6  - whether a unit calls out while unconscious
_water_dialog 					= 1;				//array no.45 - whether a dialog appears when a unit dies in water so that it can auto wash ashore 
_unconscious_drag 				= 1;				//array no.39 - whether a unit can drag the bodies of unconscious players 
_load_wounded					= 1;				//array no.61 - allows you to load unconscious units on vehicles
_altUnc_animation 				= 1;				//array no.54 - use alternate unconscious animation
_JIP_spawn_dialog 				= 0;				//array no.2  - whether a dialog appears when a player JIP so that he can be transported to a spawn point near the action 
_time_b4_JIP_spawn_dialog 		= 10000;			//array no.17 - time before the respawn dialog appears for JIP players 
_perpetual_server				= 0;				//array no.62 - NOT IMPLEMENTED
// ==================================================================
// LIST OF PLAYABLE UNITS
NORRN_player_units = ["s1","s2","s3","s4","s5","s6","s7","s8"];
// ==================================================================
// WELCOME SCREEN
titleText ["Joining Mission", "BLACK FADED", 0.2]; 	// This next line can be commented out or removed if it interferes with intro movies  
// ==================================================================
// REVIVE OPTIONS
_max_respawns 					= param2;			//array no.38 - Number of lives per unit
_JIP_respawns					= [2,30];			//array no.63 - 0 - off or the number of lives players receive when they join in progress , JIP time after the mission starts 
_revive_timer 					= 0;	 			//array no.7  - Whether you want to limit the amount of timer a player has while unconscious
_revive_time_limit 				= 300;				//array no.27 - Amount of time a player remains unconscious before respawning or dying
_revive_damage 					= 0;				//array no.37 - Unit's level of damage following revive
_unconscious_markers 			= 1;				//array no. 4 - Whether a marker appears on the game map at the location of the unconscious unit
_caseVAC						= [1, ["MASH"]];	//array no.64 - Allows units to be taken to a hospital etc to be revived
_mediVAC						= [];				//array no.65 - NOT IMPLEMENTED
_chance_ofDeath					= [0,0];			//array no.66 - Two parameters in the array the first switches off/on (0/1) chance of death when shot, increases dues to hit location and number of times revived and the second parameter switches on/off the decreasing respawn timer based on how many times you have been revived, if using set respawn-time to at least 300 seconds.
_dualTimer						= 0;				//array no.67 - NOT IMPLEMENTED - normal units can only revive for eg 30 seconds whereas medics can heal players up to 120 secs - array - [0/1 - off/on, revive timer for normal unit, timer for medic] 
_deadSpectator_cam 				= 1;				//array no.92 - leave as 0 - whether a unit can spectate other friendly units when it has run out of lives
// ==================================================================
// RESPAWN OPTIONS
_no_respawn_points 				= 1;				//array no.12 - no of respawn points (Max number 4)  
_Base_1 						= "insertion";			//array no.13 - spawn position names  
_Base_2 						= "Kamenyy";		//array no.14
_Base_3 						= "Airport";		//array no.15
_Base_4 						= "Strelka";		//array no.16 
_Base_free_respawn 				= [1,0,0,0];		//array no.36 - select whether to allow respawning at spawn points even if enemy troops are present (options OFF = 0, ON = 1) 
_respawn_at_base_addWeapons 	= 0;				//array no.11 - unit respawns with waepons it commenced the mission with  
_respawn_at_base_magazines 		= [];				//array no.34 - If using the respawn_at_base_addWeapons option then place the magazine and weapon 
_respawn_at_base_weapons 		= [];				//array no.35   types in the following arrays, if left blank respawns with weapons from mission start
_respawn_position 				= 2;				//array no.28 - 0 - respawn at base_1; 1 -  the closest enemy free respawn point; 2 - players choice; and 3 -  dies
_respawnAtBaseWait				= [1,10];			//array no.68 - Two parameters: 1st if = 1 makes players that respawn at base wait for (parameter 2) seconds before being able to see surroundings   
_objectiveBasedRP				= []; 				//array no.69 - NOT IMPLEMENTED
// Mobile Spawn Settings
_mobile_spawn 					= 0;				//array no.51 - set to 1 if you want to use mobile spawn	
_mobile_base_start 				= "base";			//array no.52
_mobile_base2_start 			= "";				//array no.70 - NOT IMPLEMENTED
_mobile_type 					= 0;				//array no.60 - set as 0 - for vehicle and 1 for man
_mobile_man 					= objNull;  		//array no.53 - place name of unit here or if not used make sure set as objNull
_mobile_man2					= objNull;			//array no.71 - NOT IMPLEMENTED
// ==================================================================
// UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED
_can_revive 					= "soldierWB";		//array no.18 
_can_revive_2 					= "";				//array no.19
_can_revive_3					= "";				//array no.72 - NOT IMPLEMENTED
_can_revive_4					= "";				//array no.73 - NOT IMPLEMENTED
_can_be_revived 				= "soldierWB";		//array no.20  
_can_be_revived_2 				= "";				//array no.21 
_can_be_revived_3				= "";				//array no.74 - NOT IMPLEMENTED 
_can_be_revived_4 				= "";				//array no.75 - NOT IMPLEMENTED
_medic_1						= "USMC_Soldier_Medic";	//array no.76 - Used in conjunction with medpacks and bleeding	
_medic_2						= "";				//array no.77 - Used in conjunction with medpacks and bleeding
_medic_3						= "";				//array no.78 - NOT IMPLEMENTED	
_medic_4						= "";				//array no.79 - NOT IMPLEMENTED	
//========================================================
// MEDPACK AND BLEEDING OPTIONS
_medpacks						= 1;				//array no.80 - Whether you want to give the units a limited number of revive kits 0/1 - no/yes
_stabilisation					= 0;				//array no.81 - NOT IMPLEMENTED
_bleeding 						= 1;				//array no.82 - Make units bleed and require bandages
_medic_medpacks 				= 3;				//array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units		
_unit_medpacks 					= 1;				//array no.84 - No of medpacks for units specified in the _can_revive variables - they are required for reviving units			
_medic_bandages 				= 3;				//array no.85 - Bandages stop bleeding		
_unit_bandages 					= 1;				//array no.86 - 
_medic_stable					= 0;				//array no.100 - NOT IMPLEMENTED
_unit_stable					= 0;				//array no.101 - NOT IMPLEMENTED
_stabTime_tillDeath				= 0;				//array no.87 - NOT IMPLEMENTED //Time until death following revive without stabilisation
// ==================================================================
// ENEMY SIDE TO PLAYABLE UNITS
_no_enemy_sides 				= 1;				//array no.22 - No of Enemy sides (0, 1 or 2). 
_enemy_side_1 					= "EAST";			//array no.23 - Enemy sides can be "EAST", "WEST", "GUER" etc  
_enemy_side_2 					= "";				//array no.24 
_enemy_side_3 					= "";				//array no.88 - NOT IMPLEMENTED
_enemy_side_4 					= "";				//array no.89 - NOT IMPLEMENTED
// ==================================================================
// FRIENDLY SIDE TO PLAYABLE UNITS
_allied_side_1 					= "WEST";			//array no.42 - Friendly sides can be "EAST", "WEST","RESISTANCE" etc.  
_allied_side_2 					= "WEST";			//array no.43 - If all players are from the same side make sure you set the same side for both variables eg "WEST", "WEST"
_allied_side_3 					= "";				//array no.90 - NOT IMPLEMENTED
_allied_side_4 					= "";				//array no.91 - NOT IMPLEMENTED
// ==================================================================
// UNCONSCIOUS CAMERA OPTIONS
_follow_cam 					= 0;				//array no.5  - option to allow viewing of friendly units while unconscious
_follow_cam_distance			= 250;				//array no.32 - the range that unconscious players can spectate friendly units
_follow_cam_team	   			= 0;				//array no.44 - set to 1 if you wish unconscious players only to spectate players within NORRN_player_units array
_top_view_height 	   			= 70;				//array no.55 - allows you to set the top down camera height 
_visible_timer 					= 0;				//array no.41 - view a cound-down timer while unconscious
_unconscious_music 				= 0;				//array no.46 - music must appear as unc_theme in music.hpp
// ==================================================================
// RESPAWN DIALOG OPTIONS
_nearest_teammate_dialog 		= 0;				//array no.3  - whether a respawn dialog appears when there are no players within this distance  
_all_dead_dialog 				= 0;				//array no.1  - whether a respawn dialog appears when all players are unconscious (_all_dead_player = 1)  
_respawn_button_timer 			= 0;				//array no.25 - Time until respawn button appears (0 = approx. 12 seconds), NB: Set to a high number like 100000 seconds if you do not want
_distance_to_friend 			= 250;				//array no.26 - If the closest friendly unit is further than this distance away trigger respawn dialog 
_all_dead_player 				= 0;				//array no.56
_all_dead_distance 				= 250;				//array no.57 - whether a respawn dialog appears when all players within a specified distance are unconscious (_all_dead_player = 1)
// ==================================================================
// Bonus life for aiding team mates function
_reward_function 				= 1; 				//array no.96 - specify whether a unit receives bonus lives for reviving other players
_revives_required 				= 1;				//array no.97 - Number of revives required before recieving a bonus life
// ==================================================================
// Team kill function
_team_kill_function 			= 1;    			//array no.98 - specify whether a unit loses a life for killing team mates
_no_team_kills 					= 1;				//array no.99 - Number of teamkills before punishment
// ==================================================================
// CONFIGURABLE OPTIONS FOR HEAL YOURSELF FUNCTION
_heal_yourself 					= 0;				//array no.8  - whether a unit can heal damage to itself
_no_of_heals 					= 1;				//array no.29 - Number of heals that each player gets during a mission  
_lower_bound_heal 				= 0.1;				//array no.30 - The damage level range between which the heal action becomes available 
_upper_bound_heal 				= 0.8;				//array no.31
// ==================================================================
// AI REVIVE BEHAVIOUR OPTIONS
_goto_revive 					= 0;				//array no. 9  - closest AI automatically moves to revive a downed team mate
_AI_smoke 						= 0;				//array no. 40 - if available reviving AI throws smoke on downed AI position
_AI_aware 						= 0;				//array no. 49 - AI will clear an enemy units it is aware of before auto reviving
_AI_cover 						= 1;				//array no. 50 - second AI unit moves with AI reviver to give cover
_AI_dismount 					= 0;				//array no. 58 - toggles ability of reviving AI units to dismount vehicles (1 = dismount)
_call_for_AI_help 				= 1;				//array no. 59 - allows AI units to call for help 
_goto_revive_distance 			= 500;				//array no. 33 - distance AI units will move to revive a downed team mate
// ==================================================================
// OPTIONS FOR PLAYER'S DEAD BODIES AND EQUIPMENT - Additional revive functions with many thanks to alef (0 - off, 1 - on except for _bury_timeout)
_drop_weapons 					= 1; 				//array no.93  - should the respawned player drop his weapons where he died?
_cadaver 						= 0; 				//array no.94 - should the respawned player's body remain there?
_bury_timeout 					= 12;				//array no.95 - if drop weapons OR player body, how long before the body is buried?
												// 0=maximum (1200s) , n=seconds up to 1200s (hard coded)

I can respawn, but that is not the primary intention....

Share this post


Link to post
Share on other sites

Revive Script Update (version 0.2f)

Download

http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_02f.utes.rar

NBIf you are already using a revive script version of 0.2c or above just replace the revive_sqf folder in your mission with the one in the rar file.

Fixes:

*Replaced a called function with a spawned function to prevent the revive_player.sqf from locking up, this may have been causing players to respawn at respawn_west

*Tidied up the new revive animation

New Features

You can now respawn on the carrier or in a chopper using the following method:

1. Copy the respawnSpecial folder into your mission file

2. IN the revive_init.sqf on the line NORRNCustomExec3 put

 NORRNCustomExec3 ="[_name,'USS Khe Sanh','chopper']execVm 'respawnSpecial\respawnSpecial.sqf'";

where: 'USS Khe Sanh' and 'chopper' are the names of the respawn points.

3. Create an APC on the USS Khe Sanh, name it Respawn_Carrier in the editor. In the init line of the APC put:

this setPosASL [(getposASL this select 0), (getposASL this select 1), 15.90]

. Also create a marker near the Khe Sanh and call it “USS Khe Sanhâ€.

4. Create a chopper with cargo positions on the map and name it Respawn_Chopper in the editor. In the init line of the chopper put

 nul = [this] execVM "respawnSpecial\Spawn_chopperInit.sqf";

5. Underneath the chopper create a marker called “Chopperâ€;

The chopper is placed at 1000 metres above the land. AI units will automatically eject and use standard parachutes. This way the AI units will land near the marker and I thought this was preferable to them ending up thousands of metres away or in the ocean. Players will HALO when they eject.

When players respawn at the boat they will need to eject/get out of the APC to gain access to the deck. Playable AI units auto eject the APC but unfortunately they cannot move across the deck of the carrier so its probably best to only use this option for playable units.

NB:[/] These scripts can be adapted for extra chopper spawn points etc.

Edited by norrin

Share this post


Link to post
Share on other sites

Hiho incomming bug report of 0.2f Revive.

Minor issues first:

There are some problems concerning body positioning when the terrain is not flat. I had luck to find the wounded soldier :D Or maybe he lost his head?

arma22009070522403892.th.jpg

Now the major issues:

I had the player-figure-is-stucked-at-respawn_west issue again (with AI and myself). It's hard to reproduce because I simply got shot and waited for revive which didn't came. I don't when and why the AI didn't respawn at the revive position but as for me I noticed that my revive timer exceeded although I had about 60 seconds left. The map showed up and was up to choose a respawn position. Before I could press any button, the screen got black, see for it a the screenshot.

arma22009070523071928.th.jpg

I hit the ESC key and so my respawn_west postion showed up.

arma22009070523080262.th.jpg

I'm sorry to say that my ArmA2.rpt is flooded in thousands of lines with

Error in expression <<NULL-object>>
 Error position: <<NULL-object>>
 Error Ungültige Zahl in Ausdruck

There were some other issues too:

Error in expression <VM "revive_init.sqf";

Error loading control mpmissions\__cur_mp.Chernarus\description.ext/rev_cam_dialog/Help_1/

Error loading control mpmissions\__cur_mp.Chernarus\description.ext/Respawn_button_3/controls/Help_1/
Error loading control mpmissions\__cur_mp.Chernarus\description.ext/Respawn_button_3/controls/Respawn_1/
Error loading control mpmissions\__cur_mp.Chernarus\description.ext/Respawn_button_3/controls/Respawn_2/
Error loading control mpmissions\__cur_mp.Chernarus\description.ext/Respawn_button_3/controls/Respawn_3/

WARNING: Function 'name' - Richard Jackson is dead

This message appeared with every AI name that had been revived, including my player name.

Saving undefined enum value -2147483648 / 6, context /SlowVehicles/InvisibleFar/Vehicles/Item27.activationType
Saving undefined enum value -2147483648 / 6, context /SlowVehicles/InvisibleFar/Vehicles/Item28.activationType
Saving undefined enum value -2147483648 / 6, context /SlowVehicles/InvisibleFar/Vehicles/Item29.activationType

That was the last entry before I quit the game because I got stuck at respawn_west.

My ArmA2.rpt had more than 54.000 lines after 2 hours of playing :(

Except for that, the revive script works perfect! The new animations are amazing and the AI gives quite good cover. Sometimes it takes very long until the AI finds my body, especially in combat situations. I guess my called reviver is chasing some enemy first?!

Edit:

How'd you like to set units setCaptive when they're reviving/dragging? Using the new animations it takes very long until the player can defend himself. Could be an optional feature too if people want to stay vulnerable.

Edited by [GLT] Legislator

Share this post


Link to post
Share on other sites

@Legis - Thanks for your detailed bug reports they are a great help to me. :) In some ways the bugs you are posting are good news. The dialog bugs (eg. Respawn_button_3/controls/Help_1/) have been there ever since the conversion to ArmA2 - so far I haven't been able to find a fix, I got a PM from Xeno a little while back saying he had the same problem with his modified version of the revive that he uses. I'll now make it my focus to try and find a fix for this.

The warning: Function Name etc is also an old bug - I know the exact line of code that's causing it but its integral to making these scripts usable for both AI enabled and disabled missions and so far I haven't been able to come up with another solution so this one at least you may have to live with. I really need an isAIEnabled command.

The others are little more disturbing. Are you using any other scripts that may be causing the null object error (haven't seen it so far myself) also does it appear in the report directly after a revivable unit is shot or when it respawns, either way I'll try and track down the line of code thats causing the null object error. The details you've given me re: the black screen should help find out the problem there - sounds like two competing titletext or dialogs. Not sure about the

Saving undefined enum value -2147483648 / 6, context /SlowVehicles/InvisibleFar/Vehicles/Item27.activationType

error - doesn't seem likely to be caused by the revive scripts but I'll see if I can find something.

Finally, I'll see what I can do about the new revive animations and setCaptive etc, I must admit I do like the idea that you have to be quite sure its safe before you try to revive a teammate ie. drag them somewhere safe.

Revive 0.2f: http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_02f.utes.rar

Edited by norrin

Share this post


Link to post
Share on other sites

There are some other functions in this mission ... the animal module, the civilian module, the civilian cars module and the surrendering module. The only module that is directly connected to the player is the combat environment module. No other scripts are running.

Share this post


Link to post
Share on other sites

Here's a very simple revive mission that is designed so that players that are new to the revive script can try it out under combat conditions.

Download

http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/missions/Deep_in_the_Woods_02h.Chernarus.pbo (version 0.2h updated 080709)

deep_in_woods.jpg

Background

As a result of our previous raids on Russian forces, several days ago a small Russian garrison was stationed in the nearby village of Myshkino to train local insurgents in their fight against CDF and US forces. This garrison represents a clear and present danger to our activities in this area and it must be destroyed at all costs.

Objective

Proceed through the forest west of Myshkino and clear the village of hostile forces.

Intelligence

We have had reports from locals friendly to our cause that enemy forces are patrolling the woods in an attempt to locate our FOB and weapon cache

Other notes

* The mission is designed to be played by a single player on a multiplayer server with the AI enabled or with a couple of mates with AI enabled or disabled. Make sure you have the grass enabled its meant to be hard to spot your enemies!

* When you are unconscious you can use the A/D keys to switch your view to other team members and W/S changes the camera type

* If the are AI enabled don't forget that pressing the key H will make them come to your position to revive you if they have a medpack available - also if unconscious it is sometimes better to let the other team members finish the contact before calling for help

* Playable units receive 2 medpacks and 3 bandages whereas the medic carries 5 of each. Med supplies are replenishable from the MASH tent at mission start. There's also some ammo crates under the netting that have basic US and soviet weapons.

* In this mission never forget to check your six!

Edited by norrin

Share this post


Link to post
Share on other sites

Revive Script Update 0.2h

I've finally found a fix for the dialog bugs that cause the massive report logs. ViperMaul actually told me how to fix these some weeks back but in my infinite stupidity its taken some weeks to sink in and for me to process what he was saying - bloody inheritance bane of my life.

Download

Test Script: http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_02h.utes.rar

Mission: http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/missions/Deep_in_the_Woods_02h.Chernarus.pbo

Important

If you are updating an older mission (post 0.2c) with this version of the script you will need to replace the revive_sqf with the one in the rar file. In addition, you need to update your description.ext file.

In the description.ext:

1. Make sure you change the respawnDelay to 4 seconds eg.

 respawndelay = 4;

2. Make sure you include the revive resources in the following order

 #include "revive_sqf\dialogs\config.cpp"
#include "revive_sqf\dialogs\define.hpp"
#include "revive_sqf\dialogs\rev_cam_dialog.hpp"
#include "revive_sqf\dialogs\respawn_button_1.hpp"
#include "revive_sqf\dialogs\respawn_button_2.hpp"
#include "revive_sqf\dialogs\respawn_button_3.hpp"
#include "revive_sqf\dialogs\respawn_button_4.hpp"
#include "revive_sqf\dialogs\respawn_button_1b.hpp"
#include "revive_sqf\dialogs\respawn_button_1c.hpp"
#include "revive_sqf\dialogs\respawn_button_2b.hpp"
#include "revive_sqf\dialogs\respawn_button_3b.hpp"
#include "revive_sqf\dialogs\respawn_button_4b.hpp"
#include "revive_sqf\dialogs\respawn_button_1map.hpp"
#include "revive_sqf\dialogs\respawn_button_2map.hpp"
#include "revive_sqf\dialogs\respawn_button_3map.hpp"
#include "revive_sqf\dialogs\respawn_button_4map.hpp"
#include "revive_sqf\dialogs\OK_map.hpp"
#include "revive_sqf\dialogs\dead_cam_dialog.hpp"

If you don't do this then you're going to get dialog errors and the game may crash to desktop.

Fixes

* Dialog bugs - all gone yippee !

* I've also changed some code around in an attempt to fix the camera lock-up that happens very occasionally and relates to a break down in the transfer of some global variables relating to the unconscious unit's position.

* A couple of fixes to the dead spectator cam (its still not perfect but it'll get there eventually).

Acknowledgements

I must send a special word of thanks to Z-Special Unit whose bug reports from large multiplayer games have been invaluable ( http://www.zspecialunit.org/forums/ ) - next time I update the readMe guys I'll make sure you are included in the acknowledgements.

Other Notes

I can confirm errors like

 Error: cannot load sound 'ca\dubbing\global\radio\female01\cz\veli.wss', header cannot be loaded.

relate to the ambient civilian module and not the revive scripts.

Edited by norrin

Share this post


Link to post
Share on other sites

If you don't do this then you're going to get dialog errors and the game may crash to desktop.

Hmmm, that would explain a good many things!:)

I see the 0.2h Description.ext has eliminated the previous "No Revive" Option????

Ver 0.2h

textsParam2[] = {"Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"};

Ver 0.2e

textsParam2[] = {"No Revive","Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"};

Share this post


Link to post
Share on other sites

Oops sorry mate :eek:

EDIT: Ok I've just had confirmation that the new animations do not always sync up across the server, so unless your missions are just for a couple of players it may be best to stick to the old anims until I can get this sorted ie. in the revive_init.sqf set:

 _altUnc_animation = 0;

Edited by norrin

Share this post


Link to post
Share on other sites

Future plans

Here's what I'm planning on adding above and beyond the original scripts:

1. Additional side support - units that can revive, can be revived, enemy sides etc

2. Option to disable revive in missions and use normal base spawning instead

3. Ability to rejoin perpetual server missions at the position and with the same gear etc you left the mission with

4. MEDIVAC system

Finally, many thanks to all of you for testing :)

really looking forward to number 3 of your future plans...since i thought that is the only thing that spoils the good teamwork in public servers....

Share this post


Link to post
Share on other sites

Revive Script Update v0.2i

I don't have a lot of time this morning but here's a small update that hopefully fixes a couple of lingering bugs in the script

Download

http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_02i.utes.rar

If you've updated to 0.2h already then just replace the revive_sqf in your mission with the one in the rar file, otherwise you're going to have to make the config changes from my last release see here: http://forums.bistudio.com/showpost.php?p=1352622&postcount=86

Fixes

* Processing of the scripts now halts until the unconscious body is created

* Fix for the CASEVAC variable, now setting the first element of the CASEVAC array to 0 will switch off this function.

Share this post


Link to post
Share on other sites

I have a problem with the dialog...

When I die the dialog will be there for about 5-10 seconds, then it disappears and you're left lying with only the timer...

The only thing I have changed in the config is to set _no_respawn_points to 0. Since I only want the revive.

Any idea what it might be?

Share this post


Link to post
Share on other sites

You have to have respawn points, as least 1 to spawn somewhere. Start by using NORRIN's spawn points and get it working then reduce as needed.

Share this post


Link to post
Share on other sites

Is any way to fix that or im doing something wrong? :

After placing playable units on map in editor (on ground) then export mission to mpmissions and try to start it, on beggining i get "selected unit is unconsious, press esc and choose other unit" its ok in sp but I cannot change unit in MP mode, and i dont want to (face/identity). This isnt happening when i put units into some vehicle, then its work good. Anyway can I fix that?

player units names are matching those in revive_init.sqf

/*

ARMA2 REVIVE SCRIPT - AI enabled or disabled

© JUNE 2009 - norrin (norrin@iinet.net.au)

Version: 0.2 ArmA2

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

See release notes for details on contributors and instructions for incorporating revive scripts into your own missions

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

Start revive_init.sqf

*/

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

// DO NOT MODIFY THIS CODE

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

// 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};

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

// THE FOLLOWING CODE CAN BE MODIFIED

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

// GENERAL REVIVE OPTIONS (Off = 0, On = 1)

_mission_end_function = 0; //array no.0 - mission ends when all players are unconscious

_call_out_function = 1; //array no.6 - whether a unit calls out while unconscious

_water_dialog = 1; //array no.45 - whether a dialog appears when a unit dies in water so that it can auto wash ashore

_unconscious_drag = 1; //array no.39 - whether a unit can drag the bodies of unconscious players

_load_wounded = 1; //array no.61 - allows you to load unconscious units on vehicles

_altUnc_animation = 0; //array no.54 - use alternate unconscious animation

_JIP_spawn_dialog = 0; //array no.2 - whether a dialog appears when a player JIP so that he can be transported to a spawn point near the action

_time_b4_JIP_spawn_dialog = 10000; //array no.17 - time before the respawn dialog appears for JIP players

_perpetual_server = 0; //array no.62 - NOT IMPLEMENTED

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

// LIST OF PLAYABLE UNITS

NORRN_player_units = ["plr1","plr2","plr3","plr4","plr5","plr6","plr7","plr8","plr9","plr10","plr11"];

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

// WELCOME SCREEN

//titleText ["Joining the Revive Test Mission\n\n(Make sure you check the mission notes for details on how the scripts work\nand the revive_readMe in the attached pdf file for the full notes on implementing \nthe scripts in your own missions and the options available)", "BLACK FADED", 0.6]; // This next line can be commented out or removed if it interferes with intro movies

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

// REVIVE OPTIONS

_max_respawns = param2; //array no.38 - Number of lives per unit

_JIP_respawns = [2,30]; //array no.63 - 0 - off or the number of lives players receive when they join in progress , JIP time after the mission starts

_revive_timer = 1; //array no.7 - Whether you want to limit the amount of timer a player has while unconscious

_revive_time_limit = 300; //array no.27 - Amount of time a player remains unconscious before respawning or dying

_revive_damage = 0; //array no.37 - Unit's level of damage following revive

_unconscious_markers = 1; //array no. 4 - Whether a marker appears on the game map at the location of the unconscious unit

_caseVAC = [1, ["MASH"]]; //array no.64 - Allows units to be taken to a hospital etc to be revived

_mediVAC = []; //array no.65 - NOT IMPLEMENTED

_chance_ofDeath = [0,0]; //array no.66 - Two parameters in the array the first switches off/on (0/1) chance of death when shot, increases dues to hit location and number of times revived and the second parameter switches on/off the decreasing respawn timer based on how many times you have been revived, if using set respawn-time to at least 300 seconds.

_dualTimer = 0; //array no.67 - NOT IMPLEMENTED - normal units can only revive for eg 30 seconds whereas medics can heal players up to 120 secs - array - [0/1 - off/on, revive timer for normal unit, timer for medic]

_deadSpectator_cam = 1; //array no.92 - leave as 0 - whether a unit can spectate other friendly units when it has run out of lives

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

// RESPAWN OPTIONS

_no_respawn_points = 4; //array no.12 - no of respawn points (Max number 4)

_Base_1 = "Mobile"; //array no.13 - spawn position names

_Base_2 = "Insertion"; //array no.14

_Base_3 = "Chopper"; //array no.15

_Base_4 = "USS Khe Sanh"; //array no.16

_Base_free_respawn = [1,1,0,0]; //array no.36 - select whether to allow respawning at spawn points even if enemy troops are present (options OFF = 0, ON = 1)

_respawn_at_base_addWeapons = 1; //array no.11 - unit respawns with waepons it commenced the mission with

_respawn_at_base_magazines = []; //array no.34 - If using the respawn_at_base_addWeapons option then place the magazine and weapon

_respawn_at_base_weapons = []; //array no.35 types in the following arrays, if left blank respawns with weapons from mission start

_respawn_position = 2; //array no.28 - 0 - respawn at base_1; 1 - the closest enemy free respawn point; 2 - players choice; and 3 - dies

_respawnAtBaseWait = [0,10]; //array no.68 - Two parameters: 1st if = 1 makes players that respawn at base wait for (parameter 2) seconds before being able to see surroundings

_objectiveBasedRP = []; //array no.69 - NOT IMPLEMENTED

// Mobile Spawn Settings

_mobile_spawn = 1; //array no.51 - set to 1 if you want to use mobile spawn

_mobile_base_start = "Insertion"; //array no.52

_mobile_base2_start = ""; //array no.70 - NOT IMPLEMENTED

_mobile_type = 1; //array no.60 - set as 0 - for vehicle and 1 for man

_mobile_man = plr1; //array no.53 - place name of unit here or if not used make sure set as objNull

_mobile_man2 = objNull; //array no.71 - NOT IMPLEMENTED

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

// UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED

_can_revive = "soldierWB"; //array no.18

_can_revive_2 = ""; //array no.19

_can_revive_3 = ""; //array no.72 - NOT IMPLEMENTED

_can_revive_4 = ""; //array no.73 - NOT IMPLEMENTED

_can_be_revived = "soldierWB"; //array no.20

_can_be_revived_2 = ""; //array no.21

_can_be_revived_3 = ""; //array no.74 - NOT IMPLEMENTED

_can_be_revived_4 = ""; //array no.75 - NOT IMPLEMENTED

_medic_1 = "USMC_Soldier_Medic"; //array no.76 - Used in conjunction with medpacks and bleeding

_medic_2 = ""; //array no.77 - Used in conjunction with medpacks and bleeding

_medic_3 = ""; //array no.78 - NOT IMPLEMENTED

_medic_4 = ""; //array no.79 - NOT IMPLEMENTED

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

// MEDPACK AND BLEEDING OPTIONS

_medpacks = 1; //array no.80 - Whether you want to give the units a limited number of revive kits 0/1 - no/yes

_stabilisation = 0; //array no.81 - NOT IMPLEMENTED

_bleeding = 1; //array no.82 - Make units bleed and require bandages

_medic_medpacks = 10; //array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units

_unit_medpacks = 1; //array no.84 - No of medpacks for units specified in the _can_revive variables - they are required for reviving units

_medic_bandages = 20; //array no.85 - Bandages stop bleeding

_unit_bandages = 3; //array no.86 -

_medic_stable = 0; //array no.100 - NOT IMPLEMENTED

_unit_stable = 0; //array no.101 - NOT IMPLEMENTED

_stabTime_tillDeath = 0; //array no.87 - NOT IMPLEMENTED //Time until death following revive without stabilisation

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

// ENEMY SIDE TO PLAYABLE UNITS

_no_enemy_sides = 1; //array no.22 - No of Enemy sides (0, 1 or 2).

_enemy_side_1 = "EAST"; //array no.23 - Enemy sides can be "EAST", "WEST", "GUER" etc

_enemy_side_2 = ""; //array no.24

_enemy_side_3 = ""; //array no.88 - NOT IMPLEMENTED

_enemy_side_4 = ""; //array no.89 - NOT IMPLEMENTED

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

// FRIENDLY SIDE TO PLAYABLE UNITS

_allied_side_1 = "WEST"; //array no.42 - Friendly sides can be "EAST", "WEST","RESISTANCE" etc.

_allied_side_2 = "WEST"; //array no.43 - If all players are from the same side make sure you set the same side for both variables eg "WEST", "WEST"

_allied_side_3 = ""; //array no.90 - NOT IMPLEMENTED

_allied_side_4 = ""; //array no.91 - NOT IMPLEMENTED

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

// UNCONSCIOUS CAMERA OPTIONS

_follow_cam = 1; //array no.5 - option to allow viewing of friendly units while unconscious

_follow_cam_distance = 250; //array no.32 - the range that unconscious players can spectate friendly units

_follow_cam_team = 0; //array no.44 - set to 1 if you wish unconscious players only to spectate players within NORRN_player_units array

_top_view_height = 70; //array no.55 - allows you to set the top down camera height

_visible_timer = 1; //array no.41 - view a cound-down timer while unconscious

_unconscious_music = 0; //array no.46 - music must appear as unc_theme in music.hpp

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

// RESPAWN DIALOG OPTIONS

_nearest_teammate_dialog = 0; //array no.3 - whether a respawn dialog appears when there are no players within this distance

_all_dead_dialog = 1; //array no.1 - whether a respawn dialog appears when all players are unconscious (_all_dead_player = 1)

_respawn_button_timer = 10; //array no.25 - Time until respawn button appears (0 = approx. 12 seconds), NB: Set to a high number like 100000 seconds if you do not want

_distance_to_friend = 250; //array no.26 - If the closest friendly unit is further than this distance away trigger respawn dialog

_all_dead_player = 0; //array no.56

_all_dead_distance = 10000; //array no.57 - whether a respawn dialog appears when all players within a specified distance are unconscious (_all_dead_player = 1)

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

// Bonus life for aiding team mates function

_reward_function = 1; //array no.96 - specify whether a unit receives bonus lives for reviving other players

_revives_required = 1; //array no.97 - Number of revives required before recieving a bonus life

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

// Team kill function

_team_kill_function = 1; //array no.98 - specify whether a unit loses a life for killing team mates

_no_team_kills = 1; //array no.99 - Number of teamkills before punishment

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

// CONFIGURABLE OPTIONS FOR HEAL YOURSELF FUNCTION

_heal_yourself = 0; //array no.8 - whether a unit can heal damage to itself

_no_of_heals = 1; //array no.29 - Number of heals that each player gets during a mission

_lower_bound_heal = 0.1; //array no.30 - The damage level range between which the heal action becomes available

_upper_bound_heal = 0.8; //array no.31

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

// AI REVIVE BEHAVIOUR OPTIONS

_goto_revive = 1; //array no. 9 - closest AI automatically moves to revive a downed team mate

_AI_smoke = 1; //array no. 40 - if available reviving AI throws smoke on downed AI position

_AI_aware = 1; //array no. 49 - AI will clear an enemy units it is aware of before auto reviving

_AI_cover = 1; //array no. 50 - second AI unit moves with AI reviver to give cover

_AI_dismount = 1; //array no. 58 - toggles ability of reviving AI units to dismount vehicles (1 = dismount)

_call_for_AI_help = 1; //array no. 59 - allows AI units to call for help

_goto_revive_distance = 500; //array no. 33 - distance AI units will move to revive a downed team mate

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

// OPTIONS FOR PLAYER'S DEAD BODIES AND EQUIPMENT - Additional revive functions with many thanks to alef (0 - off, 1 - on except for _bury_timeout)

_drop_weapons = 1; //array no.93 - should the respawned player drop his weapons where he died?

_cadaver = 0; //array no.94 - should the respawned player's body remain there?

_bury_timeout = 1200; //array no.95 - if drop weapons OR player body, how long before the body is buried?

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

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

// USER CODE - eg. NORRNCustonexec1="execvm ""myscript.sqf"";hint ""myoutput"";"

NORRNCustomExec1 ="if (_name == player) then {execVm 'briefing.sqf'};"; // Exec1 occurs following being revived

NORRNCustomExec2 =""; // Exec2 occurs when you team kill

NORRNCustomExec3 ="[_name,'USS Khe Sanh','chopper']execVm 'respawnSpecial\respawnSpecial.sqf';

if (_name == player) then {execVm 'briefing.sqf'}"; // Exec3 occurs when you spawn at base

NORRNCustomExec4 =""; // Exec4 occurs when you try and spawn at base but it is still occupied

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)

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

// DO NOT MODIFY THE FOLLOWING CODE

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

NORRN_revive_array = [];

NORRN_revive_array = [_mission_end_function,_all_dead_dialog,_JIP_spawn_dialog,_nearest_teammate_dialog,_unconscious_markers,_follow_cam,_call_out_function,_revive_timer,

_heal_yourself,_goto_revive,_unconscious_invincibility,_respawn_at_base_addWeapons,_no_respawn_points,_Base_1,_Base_2,_Base_3,_Base_4,_time_b4_JIP_spawn_dialog,

_can_revive,_can_revive_2,_can_be_revived,_can_be_revived_2,_no_enemy_sides,_enemy_side_1,_enemy_side_2,_respawn_button_timer,_distance_to_friend,

_revive_time_limit,_respawn_position,_no_of_heals,_lower_bound_heal,_upper_bound_heal,_follow_cam_distance,_goto_revive_distance,_respawn_at_base_magazines,

_respawn_at_base_weapons, _Base_free_respawn, _revive_damage, _max_respawns, _unconscious_drag,_AI_smoke,_visible_timer,_allied_side_1,_allied_side_2,_follow_cam_team,

_water_dialog, _unconscious_music, _enemy_units_1, _enemy_units_2, _AI_aware,_AI_cover,_mobile_spawn,_mobile_base_start,_mobile_man,_altUnc_animation,_top_view_height,

_all_dead_player,_all_dead_distance,_AI_dismount,_call_for_AI_help,_mobile_type,_load_wounded,_perpetual_server,_JIP_respawns,_caseVAC,_mediVAC,_chance_ofDeath,_dualTimer,

_respawnAtBaseWait,_objectiveBasedRP,_mobile_base2_start,_mobile_man2,_can_revive_3,_can_revive_4,_can_be_revived_3,_can_be_revived_4,_medic_1,_medic_2,_medic_3,_medic_4,

_medpacks,_stabilisation,_bleeding,_medic_medpacks,_unit_medpacks,_medic_bandages,_unit_bandages,_stabTime_tillDeath,_enemy_side_3,_enemy_side_4,

_allied_side_3,_allied_side_4,_deadSpectator_cam,_drop_weapons,_cadaver,_bury_timeout,_reward_function,_revives_required,_team_kill_function,_no_team_kills,_medic_stable, _unit_stable];

// start related revive functions

[] execVM "revive_sqf\init_related_scripts.sqf";

if (true) exitWith {};

//Last edited 12/06/09

Share this post


Link to post
Share on other sites

Sorry guys I've been away for a couple of days and only just got back.

@Tophe - if your still having probs mate send your mission here and I'll take a look.

@Dan - sounds like your mission start point, ie. where the units are placed in the editor, is right next to either the respawn_west or boot_hill markers. Make sure the respawn_west is at least 50 metres away from boot_hill and both markers are at least 50 metres away from where the units start on the map. In fact its best to put both markers a long way away from where you mission takes place.

Share this post


Link to post
Share on other sites

Yep that fixed that issue, thanks Norrin for a great "must have" revive script and for your help.

Share this post


Link to post
Share on other sites

There is a huge error having AI reviving the player. All AI players are gathering around the injured player but there is obviously no other unit avaiable according to the script.

That's my entry in the description.ext to force enabled AI: disabledAI = 0;

My revive_init.sqf: http://arma.pastebin.com/m73fcb89a

And a screenshot:

arma22009071321501628.th.jpg

Share this post


Link to post
Share on other sites

And some more bugs :( Revive 0.2i

The mobile respawn marker wasn't moved anymore. I don't know why and when this happened, but it must've been after some revivings in the town nearby.

Several minutes later we got another issue with the reviving function. I tried to revive player A but it didn't work. I had to revive player B first laying next to player A. The first revive attempt didn't revive anyone.

The ArmA2.rpt doesn't tell anything much: http://arma.pastebin.com/m1ee1b7fa

Share this post


Link to post
Share on other sites

Norrin, this will likely require your hands-on help.

I am attempting to create a mission featuring three sides; guerillas, civilians, and east. Each one of these sides needs seperate respawn positions. Currently I have four respawn positions across my map at four seperate towns for the civilians, four seperate camps for the guerillas, and four bunker complexes for the eastern army.

In order to facilitate each side having unique spawn points, I used the recommended method of having a respawn_init_guer.sqf, respawn_init_civ.sqf, and respawn_init_east.sqf, all called for in the init.sqf. This appears to work perfectly for the respawn points. Every player is given his side's respawn positions as optional spawns at start. There are twelve spawn points total functioning on the map right now.

The problem is that nobody is respawning after death or able to be revived. Although I'm defining soldierEB as 'can revive' and 'able to revive', East troops aren't reviving others. Furthermore any spectator script intended to operate isn't; all that is displayed is a butterfly hovering over the dead player's hip pack. The truely puzzling part is that in tests players will suffer bleeding effects and be able to use bandages!

When everything is functioning, the East forces should prevent Guerilla spawning at their respawn points, Guerillas should prevent East spawning at all but the Railhead, Civilians should affect no spawn points, spectating should be disabled while unconcious but not when all lives are lost, and every player should be able to revive every other player. And drag. That POW camp is there for a reason.

I'm working with the Tactical Gamer community and none of us have been able to figure this out; in fact, I'm probably the most advanced in understanding how it works, even though I can't get it to work completely. Their consensus is that I should ask for your help, and after three days I agree. If there are any particular files you need to see pastebinned I'll be happy to send them, otherwise consider this a request for a personal editing.

You'll be in the credits, of course. This script gives this mission a win condition and the players motivation.

Share this post


Link to post
Share on other sites

Just email your mission here and I'll take a look, sounds really interesting. :)

Share this post


Link to post
Share on other sites

I wonder if you could load bodies into an ambulance and bring them to a hospital point for a revive :)

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

×