Jump to content

Recommended Posts

;1685512']So I'm not sure about anyone else and this may very well be an issue on my end' date=' but when I do not name the players (s1, s2, etc) and just have them set to Playable (apparently this is supposed to be all you need now), the player comes in as invincible.

Also, still not sure how I feel about not being able to use the respawn button. Is there a way around this?[/quote']

Have you got them set to playable or playableUnits, as it needs to look like this

NORRN_player_units = playableUnits;

There is a way to add a respawn button - but it would be a custom key press and not through the Esc key/game menu - I was thinking along the lines of "ctrl Home" would respawn you at the mission start point.

Share this post


Link to post
Share on other sites

Yeah, I meant I had the actual character in game set to playable. I probably messed with something a bit too much.

Edit:

Alright, so even when I put in the default scripts from your example mission in mine it doesn't execute (the 'Unlimited lives' at mission start doesn't come up) when I use the s1 method. But when I comment that out and use the playableUnits, everything executes but I am invincible. Not sure what is wrong here.

Edited by Grimes [3rd ID]

Share this post


Link to post
Share on other sites

Hi Gents..

Posted a question in the forums about the 'invisible' soldier syndrome which I have suffered from for many Months now but have had no response.

I have just joined an online 'clan' and they pointed me to this thread which I had no idea existed untill now.

I have combined Op's but I'm suffering from this invisible thing which occurs after my first death, now the way I have been getting round it (which is a pain in the arse) is to quit the server and rejoin...die, quit server and rejoin, etc, etc.

Now this has, to be honest had me on the verge of ripping my hair out, I've seen the fix you have so kindly worked on but being somewhat of a PC pillock I have no idea what to do with this now I have downloaded it so I'm looking for a little to guidance on what to do with it, oh and will this work with OA?

Many thanks in advance..

Share this post


Link to post
Share on other sites

Hey Gengiskhan,

I've gone through the readme pdf but Ican't make head nor tails of it, afraid I need my hand holding on things like this...

I've only just got my head around installing addons and this looks a little too complicated for my simple mind :confused: which is why I saked for a little guidance with it...

Cheers buddy.

Share this post


Link to post
Share on other sites

Here is what you have to do

1. Place the following code into the init.sqf so that the revive scripts are activated when

players join:

server execVM "revive_init.sqf";

2. Copy across the text from the description.ext files into your description.ext file.

3. Copy the revive_init.sqf file and revive_sqf, spect, and sound folders across to your mission directory.

5. Create respawn markers for each of the sides your playable units belong to

(eg.Respawn_west) and a second marker on the map called Boot_Hill away from the action on an island for the dead units - make sure that the respawn marker and the boot_hill markers are more than 100 m apart and are at least that far from where the units start on the map.

You also need to create a marker on the map called "center". This is the point towards which a player's body will wash ashore when the respawn in water dialog is chosen (best to put this marker

6. Create additional markers eg. "West_spawn_1", "West_spawn_2" etc for any addition respawn points you want to set up for players (upto a maxiumum of 4).

7. Make any changes to the revive_init.sqf to toggle on options or change player revive number, set-up scripts for other side etc.

8. Create a gamelogic called Server

9. If you wish to use custom sounds in your mission a config file, config.cpp, for custom sounds is located in the dialogs subfolder of the revive_sqf folder and this will need to be changed.

Other important stuff:

A. interface size must be set to normal otherwise the dialog formats freak out.

B. I've completely rearranged the revive_init - all the old settings are there I've just tried to re-order them to be make it more logical.

C. You'll also notice plenty of variables that are not implemented yet - they are just placeholders until I can get some more features sorted - I'm hoping I won't have to change the revive_init in future so all you'll have to do is swap the revive_sqf in your mission folder.

D. You need to have the new health system disabled ie. remove any health game logics as these cause respawning units to be immortal once they respawn - unfortunate game bug that I'm hoping will be fixed:http://forums.bistudio.com/showthrea...hlight=respawn

A simple way is to directly use the sample mission.

There is some important things in it :

-The Markers (ex:Boot Hill, Respawn West, Center ... etc)

-Game Logic (ex:server)

-The Playable units names (ex:s1,s2)

Try to copy and Past All of this in the editor to your mission, then go to the mission folder and copy and past all of the sample missions files to your mission folder (not the mission.sqm file)

Then open the revive_init.sqf file and in the line 55 put all the playable unit name.

Share this post


Link to post
Share on other sites

Seems there might be a bug with regards to team killing.

Place a group of playable units and a helicopter. Get in the helicopter and crash it, accidentally if needed. :) You're now considered a team killer by AI. Every time you respawn AI will attack you, putting you in an endless loop of deaths. Since you never really "die" anymore you can never clear the "team kill" flag. Saw this happen last night in a mission and today in a test mission.

Anyone else seeing this?

Share this post


Link to post
Share on other sites

I'm trying to turn off the Hint in the beginning, that tells you how many revives you have. It interferes with my intro cam... But I can't find which script it is in.

Does anyone know?

Share this post


Link to post
Share on other sites

Gengiskhan..

Sorry mate but I think you're getting the wrong end of the stick...

I am talking about the 'ghost' soldier on respawn after first death problem when I play on multiplayer that is mentioned back in pages 35-38 of this thread.

I'm not talking about mission making, I was just wanting to know if there is any simple fix for this that a simple man like myself can implement because it's driving me nuts... Cheers.

Share this post


Link to post
Share on other sites

Hey everyone,

I'm making a Combined Ops mission for both USMC and US Army on Chernaus. I can't get the revive to work for the US army, but it works fine for USMC. What do I have to change in the revive_init.sqf to get it working?

1. When I preview the mission, USMC Force Recon has the revive option, but the US Army has no option at all.

2. When I export and load the mission the USMC spawns with a revive Option..... BUT The US Army gets this message "Unit is unconscious, Select another playable unit, blah blah, blah.

Im guessing the trouble is in this section.......

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

Please help and thanks in advance.

Share this post


Link to post
Share on other sites

I understand the problem you are having, but it may actually have something to do with BIS, not norrin's script. That is, unless 'soldierWB' is defined by norrin.

I can't help you with the problem, but I do recommend putting 'US_Soldier_Medic_EP1' as the 2nd medic which is the US Army standard medic.

Share this post


Link to post
Share on other sites

Ok let me try to answer you one at a time:

@Meanstreak - the fix mentioned for ghost soldiers quite a few pages back refers to missions that use an older version of the revive script. As far as I can tell what was happening was that sending a huge array in MP missions across the server was somehow causing desynch for some players and turning them into ghosts when they respawned - why it was occurring to some but not others is anybodies guess (maybe ping who knows).

So in the end I removed the need to send a huge array across the network and it fixed the "ghost who walks" problem.

So all I can say is if the missions you are playing are using the revive scripts make sure its version at least 0.43 or above.

If the missions do not use this revive script get the mission script writers to check that they are not doing something similar to what is described above in their scripts.

@kylania - I'll check this - but it can be fairly simply fixed with an adjustment via the addrating command when a player falls unconscious - I'll fix this ASAP.

In addition - Grimes [3rd ID] has identified a problem with players in vehicle crashes not dying when the vehicle is destroyed - just wanted to let you know that a fix is on its way.

@Tophe - just initialise the revive scripts after your intro has played ie. playINtro then put the code

//Initialise revive script (this next line is needed for revive script)
server execVM "revive_init.sqf";

@Brooklyn - Make sure that the position where the US army units start the mission is at least a couple of hundred metres from the respawn_west and boot_hill markers (move them miles away to be on the safe side).

Hope that answers everyone. All of the bugs found so far are fairly easy fixes but there's a couple other things I'd like to add before the next release eg. keyeventhandler respawn linked to "cntrl home" key etc, and I've got a few things on at night this week - work do, kids school plays so not sure when I'll get the next version posted - sorry.

Share this post


Link to post
Share on other sites

Version 0.46: http://norrin.org/downloads/OA/Revive/Revive_TEST_046.rar

I decided to make an interim release that should fix the following issues:

1. Playable units are invincible even though the vehicle they are travelling in is destroyed.

2. If you kill team mates you will no longer remain set as an enemy when you fall unconscious.

3. The revive scripts will run on all defined playable units even if they are not part of your group and no other players are present.

Once again please let me know if you find any bugs.

Share this post


Link to post
Share on other sites

You are amazing, Will try to get a good test of it soon. Thank you Norrin.

Share this post


Link to post
Share on other sites

Played a mission with the new version but as in version 0.45 no deaths are listed in the scoreboard. I personally was revived three times by a teammate - but at the end of the mission the scoreboard looks like i (and none of all the other players) never died in the mission.

Happened with ArmA2 Combined Operations. Here you got my settings in the revive_init.sqf:

/*

ARMA2 REVIVE SCRIPT - AI enabled or disabled

© JULY 2010 - norrin (norrin@iinet.net.au)

Version: 0.46 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 = 1; //array no.54 - use alternate revive 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

_ACE_mod = 0; //array no.102 - NOT IMPLEMENTED - Currently a place holder for possible future functionality

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

// LIST OF PLAYABLE UNITS

NORRN_player_units = playableUnits;

//NORRN_player_units = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10];

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

// 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 = paramsArray select 1; //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 = 600; //array no.27 - Amount of time a player remains unconscious before respawning or dying

_revive_damage = 0.2; //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 = "Respawn"; //array no.13 - spawn position names

_Base_2 = ""; //array no.14

_Base_3 = ""; //array no.15

_Base_4 = ""; //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 = 0; //array no.11 - unit respawns with weapons 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,0]; //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 - NO LONGER NEEDED, REDUNDANT VARIABLE

_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 = 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 = "US_Delta_Force_Medic_EP1"; //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 = 100; //array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units

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

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

_unit_bandages = 10; //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 = 62; //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 = 400; //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 = 2; //array no.97 - Number of revives required before recieving a bonus life

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

// Team kill function

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

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

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

// CONFIGURABLE OPTIONS FOR HEAL YOURSELF FUNCTION

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

_no_of_heals = 15; //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 = 0; //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 = 0; //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 = 20; //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 =""; // Exec1 occurs following being revived

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

NORRNCustomExec3 ="[_name,'USS Khe Sanh','chopper']execVm 'respawnSpecial\respawnSpecial.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,

_ACE_mod];

// start related revive functions

[] execVM "revive_sqf\init_related_scripts.sqf";

if (true) exitWith {};

//Last edited 17/08/09

//if (_name == player) then {[_name] execVM 'revive_sqf\rPrn.sqf'}

Edited by MadMike[Brig2010]

Share this post


Link to post
Share on other sites
Played a mission with the new version but as in version 0.45 no deaths are listed in the scoreboard. I personally was revived three times by a teammate - but at the end of the mission the scoreboard looks like i (and none of all the other players) never died in the mission.

You haven't set anything up incorrectly Mike its just a side effect of the new way I'm handling unconsciousness/death in the latest versions.

In earlier versions the player actually respawned when he fell unconscious and then was transposed into the unconscious state (therefore the death counter went up by one each time he fell unconscious). Unfortunately, this system was incompatible with the new OA backpacks as currently there's no way to check the contents of an ammo box, which is in effect what back packs are.

To get around this problem I used the handledamage event handler to stop the player from dying and respawning - when damage reaches 0.95 or so the player is forced into the unconscious state (ie. he can never die). That way you don't have to refill back packs or player load-out when the player falls unconscious as he never actually dies. Hence you no longer have a death recorded when you fall unconscious or respawn at base.

Seeing there is no way I know of for adjusting the number deaths recorded in the score board (please let me know if I'm wrong about this) there's not much I can do about it. I could adjust the score by -10 each time a player falls unconscious and by -20 when they respawn at base but there is little else I can do about this.

There are also a lot of positives from using this method as its allowed me to get rid of some really ugly code from the scripts.

PS: the only reason why the respawn settings are still required in the description.ext is to allow join in progress when the playable AI is disabled.

EDIT: As Rommel's just reminded me, I've forgotten to mention that although you can use the playableUnits command to define the revivable units in the revive_init.sqf these units must still be named in the editor.

Edited by norrin

Share this post


Link to post
Share on other sites

EDIT: As Rommel's just reminded me, I've forgotten to mention that although you can use the playableUnits command to define the revivable units in the revive_init.sqf these units must still be named in the editor.

Cheers for that last tidbit Norrin.

Gave it a decent work out last night, all seems great for the way we use it!

Share this post


Link to post
Share on other sites

@norrin

Thx for all the infos. For me personal it is not so important with the deathcount. And the best thing for me in the new revive is that your body stays at the position where you have "died" - espacially on top of buildings. That´s really great!

Only one thing left: If someone hits the RESPAWN button in the menu (for example by pressing ESC on the keyboard and than choose "Respawn") he gets immediately into the SPECTATING MODE. There is no way i found to return to the game after pressing Respawn. I always got stuck in the spectating mode.

Share this post


Link to post
Share on other sites

I've been having trouble getting "All units unconscious" to work. What I want to happen is if everyone is unconscious that they all get the "respawn at base" (my only respawn point) option.

Instead what is happening is you get the "All units are dead, return to the unit select screen and pick a new playable unit". This is with AI disabled. Anyone have any ideas how to get this working again? :)

Share this post


Link to post
Share on other sites

@MadMike - this is another side effect of the new way I'm handling unconscious units, the menu respawn button you are talking about makes the unit die and then respawn and this is incompatible with the new version of the scripts - so my advice is don't touch the respawn button in the menu.

The plan is to add another key binding in the scripts which you can then use to respawn (eg.cntrl home).

@kylania - really sounds like a revive_init.sqf config error - can you please either post as a spoiler or PM me your revive_init.sqf.

Thanks,

norrin

Share this post


Link to post
Share on other sites

Posted. :)

/*

ARMA2 REVIVE SCRIPT - AI enabled or disabled

© JULY 2010 - norrin (norrin@iinet.net.au)

Version: 0.46 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 = 1; //array no.54 - use alternate revive 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

_ACE_mod = 0; //array no.102 - NOT IMPLEMENTED - Currently a place holder for possible future functionality

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

// LIST OF PLAYABLE UNITS

NORRN_player_units = playableUnits;

//NORRN_player_units = [s1,s2,s3,s4];

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

// 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 = paramsArray select 1; //array no.38 - Number of lives per unit

_JIP_respawns = [30,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 = 0; //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 = "Base"; //array no.13 - spawn position names

_Base_2 = ""; //array no.14

_Base_3 = ""; //array no.15

_Base_4 = ""; //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 weapons 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 = 0; //array no.28 - 0 - respawn at base_1; 1 - the closest enemy free respawn point; 2 - players choice; and 3 - dies

_respawnAtBaseWait = [0,0]; //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 - NO LONGER NEEDED, REDUNDANT VARIABLE

_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 = s4; //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 = "US_Soldier_Medic_EP1"; //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 = 20; //array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units

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

_medic_bandages = 5; //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 = 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 = 1; //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 = 1; //array no.8 - whether a unit can heal damage to itself

_no_of_heals = 2; //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 = 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 = 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 = 0; //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)

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

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

NORRNCustomExec1 =""; // Exec1 occurs following being revived

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

NORRNCustomExec3 =""; // 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,

_ACE_mod];

// start related revive functions

[] execVM "revive_sqf\init_related_scripts.sqf";

if (true) exitWith {};

//Last edited 17/08/09

//if (_name == player) then {[_name] execVM 'revive_sqf\rPrn.sqf'}

Share this post


Link to post
Share on other sites

Having a quick look through that it looks OK. If you can, send me (PM or email me here) a link to your mission and I'll take a look through it when I get home from work later tonight.

Thanks

Share this post


Link to post
Share on other sites

I think it might be the setDamage 1 thing. I reverted to 0.45 of your revive script and this time, everyone unconscious worked flawlessly.. however when everyone was killed via the set damage trigger it booted us all to the spectate cam! I noticed that 0.46 has a spectacte cam "blank" entry in the description.ext that wasn't in 0.45, so I think that explains what we were seeing. We were in spectate, but weren't being shown anything.

Guess I'll get rid of my 'kill everyone' thing... :(

Share this post


Link to post
Share on other sites

Thanks for sending your mission :)

Ok, I think I've worked out what the problem is, and it is related to the setdamage command as you've suggested - because of the way the scripts are now set up you cannot "setDamage 1" to playable-revivable units anymore as this will cause the units to die outright (its like pushing the respawn button in the game menu).

Therefore, if the units are playable and revivable you need to use this code instead to make the units unconscious:

 _unit setVariable ["NORRN_unconscious", true, true];

If they are not playable AI units then _unit setDamage 1 works fine.

Best wishes,

norrin

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

×