Advertisement

Author Topic: Revive Script  (Read 13253 times)

0 Members and 1 Guest are viewing this topic.

Offline norrin

  • Tutorial Writer
  • **
Revive Script
« on: 14 Jun 2009, 11:34:25 »
Revive Beta

ArmA2 revive (corresponds to the old AI_enabled scripts) - it can be used with the AI_enabled or disabled:

http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_042.utes.rar (v0.42 - 110110)

Added compatibility option in revive_init.sqf for ACE2 rucks

Full implementation notes and explanation of features are now contained in a pdf file included in the download but you can also check here: http://www.ofpec.com/tutorials/index.php?action=show&id=125&page=132

A couple of other things:
1. interface size must be set to normal otherwise the dialog formats freak out.
2. Kegetys spectator script needs updating so it might cause a popup when you run out of lives and die.
3. 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.
4. 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.
5. 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

One final thing is that please only use these scripts for the time being if you have had experience with them in the past as at the moment I'm very busy trying to get the AI disabled scripts done (amongst other things) so I don't really have the time to help you to get these scripts implemented in your missions - sorry bout this but hopefully its only temporary.

If you get a chance please let me know what bugs you come across.

PS: Thanks to vengeance1 for his testing over the week-end :)
« Last Edit: 11 Jan 2010, 00:53:57 by norrin »

Offline monty67t

  • Members
  • *
Re: Revive Script
« Reply #1 on: 14 Jun 2009, 20:45:09 »
The download link isn't working.

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #2 on: 15 Jun 2009, 03:11:03 »
Seems OK here.  Maybe the server was down when you tried, either way I've added the script to the bottom of the first post.  Also just to let you know I've got some bug fixes on the way including create gamelogic error, not defined NORRN_pos_x, adding double maps etc - will test when I get home tonight and post if they are OK.

EDIT: Script updated see first post for download.
« Last Edit: 15 Jun 2009, 14:34:48 by norrin »

Offline loki72

  • Former Staff
  • ****
    • Loki's Nightmare
Re: Revive Script
« Reply #3 on: 15 Jun 2009, 20:36:51 »
very glad to see this norrin

 :good:

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #4 on: 18 Jun 2009, 02:04:23 »
Revive Script Update (18th June 2009)

Please only use these scripts if you are familiar with it and can tolerate a few bugs.
Down load
http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/ArmA2_revive01f.utes.rar

Possible fixes
* Multiple appearance of drag and revive options
* Drag action not working when using a secondary item - note if you attempt to drag while using a launcher (eg M136) you'll assume the drag position but won't be able to move until you switch to your primary weapon
* When all lives are expended the scripts now deal with death properly - for the time being you can't use Kegetys' Spectator cam as it causes a crash to desktop so make sure you leave _kegetys_spectator set to 0 - I'll start work on my own simpler spectator cam for death.
* Respawn at base without weapons - added a 2 second wait before these are defined so if you are giving units an alternate load-out at mission start please make sure it occurs quickly after mission initialisation

Known Issues
* Dialog errors in ArmA2 report resulting from respawn buttons.
* Bug whereby the map dialog is not moving to possible respawn points (not sure what's causing this but it may result from disableserialisation).
* Report error relating to name of dead unit - you'll have to live with this I'm afraid as I haven't found another solution for this yet
* Reported problem with the mobile respawn tent disappearing - I haven't been able to replicate this bug yet so please let me know if you come across it and let me know what happened prior to it occurring

Please let me know if you are still having issues with any of the proposed fixes

Other Issues
* There's a few new variables in the revive_init.sqf - sorry about this but if as MC suggests I should try to make a one script fits all situations solution then this was necessary
New variables in revive_init.sqf
_kegetys_spectator = 0;
also
Code: [Select]
// 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)
* Ran a quick test blowing up 4 AI in a Hummer without lag (constant 40-45 FPS).  That being said these scripts are quite complicated and if you have too many playable AI enabled there is a possibility they will cause lag.

New Features
* You can now drag unconscious units to vehicles with empty cargo spaces and load them onboard, once they are loaded you can unload them - as this is new if you try it let me know how you get on.
* PDF file containing implementation notes and explanation of features

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

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #5 on: 23 Jun 2009, 08:10:25 »
Revive Update (version 0.2b - Updated 240609)

I'm very sorry but the revive_init.sqf has been changed again as new options have been added that I hadn't envisaged, these are: _medic_stable, _unit_stable, _reward_function, _revives_required, _team_kill_function, _no_team_kills

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

Fixes
* Fixed the "You're dead" dialog zooming on respawn points
* Hopefully, fixed lag when many players are unconscious
* Fixed loading wounded action on a dedicated server
* The long unconscious camera panning that was causing crashes has been removed

New features
* unconscious_drag/carry - players can drag and carry the bodies of unconscious players and playable AI - units must be dragged before the carry action appears
* load_wounded - unconscious units can be loaded/unloaded onto vehicles with empty cargo space - units can only be loaded if they are being dragged (not carried)
* CASEVAC  - units can be taken to a hospital etc to be revived, needs to be an array eg.
  • not used or [1, ["MASH"]]; the second internal array ["MASH"] represents the type of object at which you'd like the units to automatically revive, note: you can put a list of objects here.

* deadSpectator_cam - whether the screen turns black or a unit can spectate other friendly units when it has run out of lives - currently using a simple spectator script (see readMe for more details).
* _medic_1 - allows you to specify an additional class which can have more medpacks or bandages than the standard unit. Can only be used in conjunction with medpacks and bleeding.  
* medpacks - give units a limited number of revive kits
*bleeding - make units bleed and require bandages
medic_medpacks - no of medpacks for units specified in the _medic variables - they are required for reviving units         
* unit_medpacks - no of medpacks for units specified in the _can_revive variables - they are required for reviving units
* medic_bandages - no of bandages for units specified in the _medic var - bandages stop bleeding
* unit_bandages - no of bandages for units specified in the _can_revive var
Note: Resupply of medical items can be obtained by players by going up to a MASH tent and using the "Take medical supplies" action.  Playable AI are automatically resupplied if they are within 5 metres of a MASH tent.  Also for the time being playable AI do not bandage themselves so you'll have to take care of them
* reward_function - whether a unit receives bonus lives for reviving other units
* revives_required - number of revives required before receiving a bonus life
* team_kill_function - specify whether a unit loses a life for killing team mates
* no_team_kills - number of team kills before punishment

New Issues
* The unconscious camera is jerky when spectating other players on a dedicated server - currently looking into ways to fix this
« Last Edit: 24 Jun 2009, 14:57:26 by norrin »

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #6 on: 29 Jun 2009, 04:00:27 »
Revive Script Update (version 0.2c)

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

Fixes
* Camera changing issues between 1st and 3rd person
* JIP issues
* Fixed issue with Leader JIP while AI units unconscious
* Fixed mission end function - NB: this function only detects players so when it is enabled even if there are conscious AI team mates if all players are down the mission

ends.

New features
_JIP_respawns   
Two element array
1st element in array - 0 - off or the number of lives players receive when they join in progress,
2nd element of array - JIP time after the mission starts
eg1. [0,0] Off
eg2. [2,30] Players JIP with 2 lives if they JIP 30 seconds after the mission starts

_chance_ofDeath
Two element array
1st element in array - switches off/on (0/1) chance of death when shot, increases dues to hit location and number of times revived
2nd element of array - 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.
eg1. [0,0] Off
eg2. [1,1] both options on

Code for chance of death
Code: [Select]

        case "": {_respawn_chance = 500};
case "hands": {_respawn_chance = 200};
case "legs":   {_respawn_chance = 70};
case "body":   {_respawn_chance = 50};
case "head_hit": {_respawn_chance = 20};
};
if (_respawns == 2) then {_respawn_chance = (_respawn_chance/2)};
if (_respawns == 3) then {_respawn_chance = (_respawn_chance/3)};
if (_respawns == 4) then {_respawn_chance = (_respawn_chance/4)};
if (_respawns == 5) then {_respawn_chance = (_respawn_chance/5)};
Code for respawn time
Code: [Select]
switch (_body getVariable "NORRN_body_part") do
{
case "": {_revive_time_limit = _revive_time_limit};
case "hands": {_revive_time_limit = _revive_time_limit};
case "legs":   {_revive_time_limit = (_revive_time_limit * 4)/5};
case "body":   {_revive_time_limit = (_revive_time_limit * 3)/5};
case "head_hit": {_revive_time_limit = (_revive_time_limit * 2)/5};
};
if (_respawns == 2) then {_revive_time_limit = (_revive_time_limit/2)};
if (_respawns == 3) then {_revive_time_limit = (_revive_time_limit/3)};
if (_respawns == 4) then {_revive_time_limit = (_revive_time_limit/4)};
if (_respawns == 5) then {_revive_time_limit = (_revive_time_limit/5)};

NB: This may need a little tweaking

_respawnAtBaseWait         
Two element array
1st element in array - if = 1 makes players that respawn at base wait for (parameter 2) seconds before being able to see surroundings  
2nd element of array - the number of seconds that players are forced to wait if they respawn at base
eg1. [0,0] Off
eg2. [1,10] When players respawn at base they have to wait 10 seconds until they can see and move about.

Other notes
If you press escape while in the spectator cam you'll see the players body from a slightly different view - to get the game menu to quit the mission etc press escape a second time.

Many thanks to my daughter Olivia for helping me test the script :)
« Last Edit: 29 Jun 2009, 04:02:14 by norrin »

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #7 on: 04 Jul 2009, 01:35:52 »
Revive Script Update (Version 0.2e)

Download
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_02e.Chernarus.rar

New Features
* Added several of the new healing and wounded animations from ArmA2 as per Bravo6's request, set _altUnc_animation = 1 in the revive_init.sqf to use the new animations. To use the "classic" revive animations set it to 0. NB: the new healing animations currently only work for players ie. AI will use the "classic" animations when healing. Also because of the new animations players will only get the revive action when they are within 2 metres of an unconscious unit not 4 metres as in previous versions.

* Added an option so that revive missions can be played without the revive scripts enabled. To do this make sure _max_respawns is set to 2000 in the revive_init.sqf. You can do this using param2 in the description.ext for instance. If this option is enabled, when the players and playable AI units die they will either get the all dead respawn dialog and have a choice of which free respawn point to spawn at or they will automatically respawn at the nearest free respawn point as per the settings in _respawn_position variable in the revive_init.sqf. In addition, if a time greater than zero is set in the second parameter of the _respawnAtBaseWait array then players will get a black window with a respawn timer for this length of time and playable AI's movement will disabled for this period of time when they respawn. NB: To work you must have at least one spawn point named in the revive_init.sqf other than mobile.

Fixes
* In this release there are several fixes to the revive cam, which hopefully fix the camera lock-up while spectating a unit that is shot (as described by SnR, gonza and VanhA) and also fixed the all dead dialog not appearing.

* Removed some superfluous variables from the revive_player.sqf

* Removed dialog blink buttons from unconscious camera, rationalised variable usage

* Fix for load units on vehicle

* Added fixes for call for help function

If you are already using revive 0.2c then all you need to do is replace the revive_sqf folder in your mission with the new one in the rar file

Offline Kremator

  • Members
  • *
Re: Revive Script
« Reply #8 on: 04 Jul 2009, 11:19:43 »
norrin,

This is great to see mate .... testing it now.

Will feedback what I find.

[TAO] Kremator

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #9 on: 05 Jul 2009, 12:59:08 »
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
Code: [Select]
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:
Code: [Select]
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
Code: [Select]
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.

Offline Kremator

  • Members
  • *
Re: Revive Script
« Reply #10 on: 05 Jul 2009, 21:21:52 »
norrin,

Been testing the scripts and they are very good.  However I have found that if I send the AI over to the fallen comrade sometimes they do NOT revive them.

Is there a way that I can force the fallen to call for help from a close AI ?

The chopper respawn is great - although it's a little annoying to have the rotor sound all mission - any solutions ?

[TAO] Kremator


Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #11 on: 06 Jul 2009, 04:40:22 »
Not sure if there's much I can do about the rotor sound - maybe put the chopper up a bit higher - in the spawn_chopper_init.sqf (in the respawnSpecial folder) on line 10 change the 1000 to a 2000 or higher - just remember that any playable AI that use this respawn point are going to take a lot longer to reach the ground.  I could make the units just spawn in air but I like the idea that if all the players respawn together they can sit in the chopper and discuss tactics and wait for each other before they HALO as a group.

As for your AI team mates not reviving are you using the medpacks option by any chance as they may not have a medpack to allow them to revive.  Something else you could try would be to enable the _goto_revive option in the revive_init.sqf that way AI units will automatically moveTo downed comrades if they have a medpack available.
« Last Edit: 06 Jul 2009, 04:42:20 by norrin »

Offline loki72

  • Former Staff
  • ****
    • Loki's Nightmare
Re: Revive Script
« Reply #12 on: 06 Jul 2009, 23:28:42 »
howdy...

just spent a while reading the .pdf.. very nice b.t.w....

but it says the mobile respawn should be named: "r_mobile_spawn_vcl"

no addaction appears.. but when i names it "mobile" it worked?

Code: [Select]
_Base_1 = "Mobile"; //array no.13 - spawn position names  
_Base_2 = "Insertion"; //array no.14
_Base_3 = ""; //array no.15
_Base_4 = ""; //array no.16
_Base_free_respawn = [0,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,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 = "base"; //array no.52


any thoughts?

edit... i just changed the name in the init.sqf to "r_mobile_spawn_vcl" and all is well..

so in the .pdf.. the line that says

base_1 = mobile....

should say

base_1 = r_mobile_spawn_vcl

 :good:
« Last Edit: 06 Jul 2009, 23:35:57 by loki72 »

Offline Kremator

  • Members
  • *
Re: Revive Script
« Reply #13 on: 06 Jul 2009, 23:49:14 »
Regarding the HALO is it possible to just have a quiet object that immediately kicks you out on respawn instead of a chopper ?

Loving the scripts - will change the goto revive function.

Cheers mate!

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #14 on: 07 Jul 2009, 02:53:25 »
co5 Deep in the Woods

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 (updated to version 0.2h on the 080709)



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!

@Loki - Sorry for the confusion mate - but could you also post the next 5 or six lines of code from the revive_init.sqf that are directly underneath the ones you've posted as I have a feeling that your set up is not quite right
  
@Kremator - I'll have to think about a solution for the HALO - I quite like it the way it is but I understand that the chopper noise is annoying.

EDIT

Revive Script Update 0.2i

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 me 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_02i.utes.rar

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.
Code: [Select]
respawndelay = 4;2. Make sure you include the revive resources in the following order
Code: [Select]
#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
Code: [Select]
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.
« Last Edit: 12 Jul 2009, 12:42:54 by norrin »

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #15 on: 19 Jul 2009, 15:27:18 »
Revive Script update (Version 0.2M)

Download
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_02M.utes.rar (updated 230709)

Fixes
* Serialisation error that occurred when trying to respawn at a base which was occupied by enemy forces
* Optimisations in collecting spectatable units in the dead spectate cam script
* Possible fix for AI not reviving units - @Legislator, I may have finally found the bug that was causing this
* Fix for instant revive when using the alternate unconscious animations
* Fix for sending unconscious unit animation across the net when using alternate unconscious animations
* Fix for units rolling over while being dragged when using alternate animations

For long time users - just replace the revive_sqf in your mission folder with the one in the rar file.

EDIT: Updated 230709 to version 0.2L - contains zoomable top down camera (using mouse wheel), optimisations by Xeno and fixes to the dialogs by Lester

EDIT EDIT: Updated to 0.2M - fix for mobile spawn marker and blank screen when revive timer elapsed.
 
@hoz - sorry no fix for your bug yet mate as I haven't been able to reproduce it yet.
« Last Edit: 23 Jul 2009, 12:06:53 by norrin »

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #16 on: 12 Aug 2009, 01:57:58 »
Revive Script Update (version 0.2O)

Download
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_02o.utes.rar
If you are using a version 0.2C or higher you can just replace the Revive_sqf subfolder in you mission with the one in the archive

Fixes
* Xeno's map dialog fix - thanks again mate :)
* Further optimisation to the scripts to reduce the number of instances of the scripts running on the server and the players PC when using with the AI disabled and in some instances AI-enabled.
* When the units were dead (not unconscious) in some instances they continued to call out and the revive and drag actions also appeared.
* Fixed placing of mobile respawn if option no revive selected at mission start-up
* If the CASEVAC object is a vehicle you will now need to load the unconscious unit on the vehicle in order to revive him NB: In the test mission both the HMMWV and the mobile MASH can be used for CASEVAC.
* Removed the code that reloaded the briefing following respawn as this feature is now included in patch 1.03.

Future Plans
I really want to get the current code as bug free as possible so I have a solid foundation before adding any new features

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Revive Script
« Reply #17 on: 14 Aug 2009, 05:14:49 »
The freeflow cam controls don't seem to work in this latest version. I take that back, they seem to take a few secs to start working

Even in the o version we're still getting the issues with respawn_west issue.
« Last Edit: 14 Aug 2009, 05:34:17 by hoz »
Xbox Rocks

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #18 on: 18 Aug 2009, 02:37:20 »
Revive 0.3 beta update

This is a beta for the new version.  Hopefully you won't notice any difference to the scripts but I've changed/simplified the way the scripts treat the unconscious body.  In the past I've created a new unit to represent the unconscious player, in this version the player's avatar is the unconscious unit.  This has only become possible with some of the new scripting commands introduced in ArmA2.  It will hopefully reduce the strain on the server (especially when multiple units die at the same time) and completely removes the possibility of respawning at respawn_west.    I've tried my best to test these changes comprehensively but please only use if you are willing to put up with any bugs the changes have introduced.  Also note that if you are playing with the AI enabled and JIP if the AI unit you are joining into is unconscious you will start out unconscious

Download
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03b.utes.rar If you are using revive 0.2C+ just copy the new revive_sqf and respawn_special to your mission directory (Updated 190809)

Fixes
* definition of medpacks, AI_help state etc for AI units
* stowing respawn tent action if you have been in water or over water
* smoke for AI units

Other changes
*Unconscious units by default only do the new unc animations, changing the _altUnc_animation setting now only changes the revive animation that the players perform.

@hoz - I'm hoping this will fix the respawn west issues mate

Note: will update first post in thread if I get feed back suggesting that all's OK.

EDIT:

Revive 0.3b beta update (190809)

Fixes
*Number of medpacks used for AI units  
*JIP respawn dialog now works correctly with mobile respawn and with the special respawn points eg chopper and LHD
« Last Edit: 19 Aug 2009, 13:43:13 by norrin »

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Revive Script
« Reply #19 on: 19 Aug 2009, 21:46:01 »
The update seem to fix respawn west which was great. One thing we noticed was alot of west bodies sticking around after the fact. And of course the limit of 2 lives on JIP I mentioned last night.
Xbox Rocks

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #20 on: 20 Aug 2009, 03:57:07 »
Vengeance over at the BIS forums posted this:
"This came from Xeno:
Edit: There's another bug in A2 1.03, dead AI units can't be deleted sometimes (only in MP) although the object refs get into my dead list array just fine,

I noticed in Revive sometimes Dead Units did not get deleted."

There is a possibility that if I remove all the dead units weapons first they delete fine (need to test this further) if not I may have to modify the code if its not fixed in the next patch.

Shark's mission uses an option so that JIP players only get 2 lives if they start the mission 30 seconds after the mission starts - is there a chance this is what you're seeing mate?




Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Revive Script
« Reply #21 on: 20 Aug 2009, 04:33:13 »
This could be happening. Just to understand... any players joining the mission 30 seconds after it starts will only have 2 lives?
Xbox Rocks

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #22 on: 24 Aug 2009, 03:12:27 »
Revive 0.3 Beta Update (Version 0.3C)

Download
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03c.utes.rar
Just replace the revive_sqf folder in your mission directory

Fixes
* JIP errors
* Dead body removal - found the code error responsible for this
* Updated some global variables to new ArmA2 format
* Fixed unlimited revives when JIP revive function used
* Fixed slopeFix function


Offline MRO204

  • Members
  • *
  • I'm a llama!
Re: Revive Script
« Reply #23 on: 19 Sep 2009, 11:47:15 »
In 'BAS2' Fers F2 Mission Framework there is a working version of kegetys version 1.03 spectate for Arma 2 if your interested, i took it out and use it in my missions :) works very well.

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #24 on: 28 Sep 2009, 05:47:33 »
Revive Update 0.3e
Download here: http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03e.utes.rar

Just a couple of minor changes for the new patch - includes the new 1.04 parameters, a fix for the smoke grenades and a small change to the cam follow script.

There's no real need to update unless you want to. Just replace the revive_sqf in your mission with the one in the archive.

I also want to announce that I'm taking a backward step from the community. I'll still be updating the revive script for new patches, I may even add some new features from time to time but I won't be supporting this script or any of my other work to the same extent as previously.

This means I won't be answering PMs or emails for help any more - I'm very sorry about this but its been getting a little out of hand recently and I simply can't help everyone who asks for scripting/addon help and advice and maintain my own sanity, which is questionable at the best of times.

Offline SFisher

  • Members
  • *
Re: Revive Script
« Reply #25 on: 30 Sep 2009, 18:14:14 »
Norrin, thanks for the revive sripts! I am interested in how I change revive parameters, so that they become Param3, while you have them in the script is set Param2 ???

Pardon me for my bad English... =)

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #26 on: 22 Oct 2009, 01:48:40 »
The one trick pony is back :)

Revive Script 0.3f Update

Download
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03f.utes.rar - if you're updating just replace the revive_sqf folder with the one in the test mission

Fixes
There's very little change really just attempted fixes for a couple of lingering bugs:

1. AI no longer target unconscious units
2. Animations work correctly now if call-out is disabled
3. When using the mobile spawn option the script automatically uses _base_2 as the starting point for the mobile spawn marker - there is no longer a need to create a "base" marker on the map for mobile spawn. - Note: updated the readMe to reflect this change

If you get a chance to try it let me know if you run into any problems.

Many thanks,

norrin

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
Re: Revive Script
« Reply #27 on: 10 Nov 2009, 23:08:25 »
thanks again for all your scripts! :good:
Just a remark: if no player takes that slot, I wish I could tell an Ai medic to deploy the mobile spawn...

And by the way, in another mission, I added the choice of ambulance or medic mobile respawn.

in the description.ext, MP parameters class, I added :

Code: [Select]
        class Mobile
        {
// paramsArray[5]
                title = $STR_titleparamobile;
                values[] = {0, 1};
                texts[] = {$STR_paramobile1,$STR_paramobile2};
                default = 0;
        };
where   STR_titleparamobile=Mobile Respawn
           STR_paramobile1= Ambulance
           STR_paramobile2= medic of group alpha (named alpha7 in my mission)

 then in my init file:
Code: [Select]
if (paramsArray select 5==0) then {mobile=objnull} else {mobile=alpha7};
sleep 0.02;
server execVM "revive_init.sqf";

 and finally in the revive_init (array n°60 and 53 in version 3.e):
Code: [Select]
_mobile_type = paramsArray select 5;
_mobile_man = mobile; 


and it works all right! :good:
(i've got of course an ambulance called “r_mobile_spawn_vcl" ready to be used for mobile respawn on the map)

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #28 on: 11 Nov 2009, 02:25:12 »
@FleePee - thanks for that mate - its a great idea and nice work on the choice of mobile spawn point - both things I hadn't considered.

Anyway here's the new version, unfortunately the latest upgrade doesn't include Flee's playable AI deployable mobile spawn, but it does fix a couple of lingering bugs.

Revive Update Version 0.3g (7th November 2009)

Had a chance to actually play a couple of missions that use the script over the last couple of weeks and realised the revive timer count down was hopelessly inaccurate so I've tweaked the code - it should now only be a couple of seconds out after a 300 second revive time limit rather than 30 seconds out. I've also fixed the anti-water code to make it more compatible with AI and removed the second death that occurs after washing ashore so the number of deaths on the scoreboard should accurately reflect the number that have occurred. If you get the swimming on dry land bug please let me know.

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

You know the drill - if you're a repeat offender then just copy the new revive_sqf folder over the existing one in your mission

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #29 on: 13 Dec 2009, 10:49:02 »
Revive Update 0.04

Just a small update adding compatibility with ACE2 rucks and a couple of fixes

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

Added
New option in revive_init - _ACE_mod - when turned on enables respawning ruck sacks

Fixed
Hopefully fixed missing parameters for _AI_aware function as identified by Wolfy.au
Ability to change posture while dragging - eg. you can no longer drag other units while prone etc.

NB: No need to update the revive unless you're planning on using ACE2. Also remember there have been changes made to the revive_init.sqf so if you update your going to have update this config file as well

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
Re: Revive Script
« Reply #30 on: 15 Dec 2009, 20:09:13 »
I was wondering how to add a respawn point during a mission... ???
In the revive_init of the revive folder there is:
Quote
_Base_4 = NORRN_revive_array select 16;
Can I just add in a script:
Quote
NORRN_revive_array select 16="airport";
and then launch again the revive_init.sqf script of the revive folder?

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #31 on: 11 Jan 2010, 00:49:16 »
Revive Script Update Version 0.42
Download
http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_042.utes.rar

Fixes
* The "C" key press while dragging bug 
* The invisible man bug - thanks to [KH]JMan and [KH]Cross at Kelly's Heroes
* Removed dependency for _ACE_mod param in revive_init.sqf - ammo respawn now works for both ACE2 and v1.05 without need for this parameter switch - thank you Xeno
* Updated ReadMe

Other Notes
This revive_sqf folder should work with the revive_init.sqf from any missions  made with revive versions 0.3+ so if you need to update your mission because of the "invisible man" bug just swap the revive_sqf folder in your mission with the one in the archive.

The "invisible man" bug
Wow this was a hard one - here's what I think may have been happening but remember I'm only guessing now.

The previous versions of the script generated a global variable that was transferred across the network that contained a list of the weapons and the magazines that a player was carrying when he fell unconscious as well as a couple of other parameters.
Code: [Select]
_body setVariable ["NORRN_unc_array", [_dir, _offset, _magazines, _weapons, _revive_damage], true]; As you can imagine this array list of magazines and weapons would be quite large (as it lists each mag etc by name) and therefore a huge variable (containing an enormous amount of information) was being transferred across the server network.

In the mission that Jman found that worked the lists of magazines and weapons in the NORRN_unc_array variable were empty as some other code added by the mission maker was taking care of  weapon respawn, therefore, the NORRN_unc_array variable was quite small.

So why was this a problem, now be warned the rest is just guess work,   depending on certain internet connection conditions, such as your bandwidth, speed of connection and line quality (any combination of these factors) it appears that sending this huge variable across the network was causing desynch between the client's PC and the server, which in turned caused the "invisible man" bug.  This desynch problem seems to only occur for a very small number of revive users and whatever was changed in ArmA2 v1.05 seems to have exacerbated this problem.

So the moral of this story is do not send enormous variables (especially ones that contain lots of strings) across the network. 

Offline damdam

  • Members
  • *
Re: Revive Script
« Reply #32 on: 16 Jan 2010, 10:27:13 »
i need some help finding where the error is.

the problem is selecting how many revive i like to have in game

if i select 5, 7, 10 or 20 i only get 2 life's infinite life and no revive is working

i am using 0.42 and the only thing i have changed is

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

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

_medic_1                  = "RU_Soldier_Medic";   //array no.76 - Used in conjunction with

the players are Insurgents

Offline norrin

  • Tutorial Writer
  • **
Re: Revive Script
« Reply #33 on: 13 Jul 2010, 03:34:28 »
Edit new version is up (0.46)
See here for more info: http://forums.bistudio.com/showpost.php?p=1688028&postcount=539

Hopefully adds compatibility with OA back-packs amongst other things and rationalises the SP/MP versions into a single suite of scripts.

norrin

Edited 18/07/10
« Last Edit: 18 Jul 2010, 10:14:05 by norrin »

Offline [FH]Stronkie

  • Members
  • *
Re: Revive Script
« Reply #34 on: 06 Apr 2011, 12:59:16 »
I want to thank norrin for the making of his script

What I tried to do is make (in our PvP template) Mobile Spawnpoints..

I have no luck with that so far..

The simple PvP Norrin script I used.. Using the one revive.sqf file.. but that is totally not working for me..

It is working.. but then without spawnpoints..

Only base_east and base_west are useable

But If I use the Norris version of the PvP template with two revive sqf's(for each side) I can use the mobile spawn point.... Problems is only that that one has the "ghost" bug and the light version doesnot have it..

So my question is..

I want to have (with the I44 mod) one base spawn and one mobile spawn (on a player) for BOTH sides..

How can I make this happen