PDA

View Full Version : Revive Script



Pages : [1] 2 3 4

norrin
Jun 11 2009, 22:08
http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/revive.jpg

Description
This package of scripts creates playable units that fall unconcious when killed, which can then be revived. Enabling the ability to revive and heal other players, along with the combination of revive and respawn can really enrich your mission. The scripts can be used to enforce co-operation between players as you'll need to stick together and help one another to successfully complete a mission and they can also be used to limit the number of lives given to each player in respawn missions. These canned scripts take the guess work out of building respawn and revive into your mission.

Download
http://home.iprimus.com.au/simonnsl/revive/revive050_OA.rar (Version 0.50 - Can be used in SP or MP missions with AI enabled or disabled for Operation Arrowhead or Combined Operations)
If by contrast you are using vanilla ArmA2 then you'll need this version of the revive scripts:http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_042.utes.rar
Implementation notes and credits are now contained in the PDF file in the download.

Simple Revive Mission: http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/missions/Deep_in_the_Woods_02h.Chernarus.pbo (so you can see what these scripts do in a combat situation - uses a much older version of the revive scripts - to be updated).

There's also a PvP template for 2 sides that was kindly posted by Le Culto available here: http://norrin.org/downloads/ArmA2/revive/pvp/test_revive_pvp.Chernarus.rar - this also uses an older version of the script (0.3f) but it can be used as a guide on how to set up PvP revive missions using the latest version (to be updated)

What does the revive script do?
In its most basic form the revive script offers an alternative to the built in respawn function provided by BIS - it only works in MP missions. Essentially when a player is killed rather than dying and respawning at base he falls unconscious where he was shot and then he can be revived by another player and start from where he was killed, with the same weapons and ammo he was carrying.

While the player is lying unconscious waiting to be revived he can spectate any of the other units in his team using a range of cameras.

The script is designed to enforce team play as the only way you 're going to respawn is if some one comes to you aid.

You can see an old video showing (from 2 and a half years ago) showing this basic functionality here: http://www.youtube.com/watch?v=0zdcLWKcM5w - mind you it’s a lot more refined than this now eg. additional camera functionality amongst other things.

Now that's the script in its simplest form but there are a myriad of additional options.
These include but are not limited to:
* Can enforce a set number of lives per player before he is declared dead outright
* Enable a revive time which if it elapses results in (your choice of) player death, automatic respawn at base or the players choice of multiple respawn points
* You can limit who can revive, for instance may specify that only medics can revive.
* Unconscious bodies can be dragged and carried, loaded onto vehicles and taken to specified CASEVAC points to be revived.
* Bleeding and bandages can be enabled - when damage reaches a certain level a unit starts bleeding - this can be stopped with bandages, if bandaging does not occur bleeding can cause unconsciousness - it also causes temporary black-outs
* You can also designate the number of revive packs a player carries so that he may only be able to revive lets say 3 players before he has to restock at a MASH tent
* Possiblity of a mobile respawn point, either player or vehicle based
* The scripts are playable AI compatible and there are options so that playable AI automatically move to and revive unconscious team mates or only come to the aid of a player if he calls for help (an option to the player while unconscious) - or if sent by the team leader to help another player or unit.
* If using AI you can specify that the AI throw smoke when attempting to revive as well as have a second AI unit provide cover while the other revives.
etc etc.
* Revived units can be given damage so that they are not a full health once the regain consciousness.

Using these options, the basic game play of ArmA2 can be made easier or a hell of a lot harder - most importantly they will hopefully enforce team play in the MP environment.


Possible fixes
* Updated for ArmA 2 v1.04 parameters
* Multiple fixes for alternate unconscious animations
* AI not reviving units
* Serialisation errors which occurred while trying to respawn at occupied bases
* Dialog report errors
* 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
* 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

Known Issues
* 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

New Features
* New animations
* Respawn on the carrier or in a chopper
* Turn revive off as a parameter in missions
* Limit the number of lives for players who JIP
* Chance of death - risk based on the number of times you've been revived and the location of the hit
* Make units wait if they respawn at base
* 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 - units can only be loaded if they are being dragged (not carried)
* PDF file containing implementation notes, credits and explanation of features
* Players can drag and carry the bodies of unconscious players and playable AI - units must be dragged before the carry action appears
* CASEVAC system so that units can be taken to a hospital etc to be revived, needs to be an array eg. [0] 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.
* Spectator_cam after death - now there's an option so that 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).
* You can 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.
* Can limit the number of revive kits per unit
* Can make units bleed and require bandages
* 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 - Bonus lives for reviving other units
* team kill function - Lose lives for killing team mates

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 :)

[ZSU]Preacher
Jun 11 2009, 22:13
Norrin, we LOVE your work!!! :) We couldn't play ArmA without your revive script, and are EAGERLY awaiting Revive v2. :yay:

Does Revive complement or replace the ArmA 2 wounding system?

norrin
Jun 11 2009, 22:16
Hoping it will be complimentary and so far it appears to be but won't know for sure until I get all the niggles ironed out.

[ZSU]Preacher
Jun 11 2009, 22:53
If we restrict the revive capability to medics, is there any way to implement a respawn timer for the medics only (say 3 minutes to discourage the medics from getting killed), whilst disabling the respawn timer for all other players (so they have no choice but to be revived)?

[GLT] Legislator
Jun 12 2009, 05:42
I'm really looking forward to this! MP mode is useless for me without that script.

CarlGustaffa
Jun 12 2009, 06:52
Don't think you can have different 'respawn timers' using the engine system. I think you would have to work with instant respawn for everyone, then some artificial delay (call it inprisonment) before you regain control over the character.

But I have some ideas:
1) CAS Evac system. Bring the unconscious player to a revival point for instant respawn, fully healed. It's like a medic doing the revival, but for use when the medic is not in play.

2) Not too magical. I mean, sometimes you just die. Explosions and head shots shouldn't be possible at all to revive, other stuff depending on the wound that caused you to bleed to death.

3) If medic is in play, the medic has three times the respawn times as others. One thing though, a variable respawn time should be slot based depending on mission, not class based. That way it will be easy to use with other addons. I might want to use even greater penalties for medics. Also snipers would get a respawn penalty from me. Riflemen the quickest, given they are the easiest to 'replace'.

4) Also, a slot based 'weapon handling system'. Me as a mission designer might allow others to 'steal' weapons from downed players, but if it is an 'exotic' weapon, I wouldn't like to have the weapon increase in availability due to respawning. I.e. if a player attempts to pickup a Javelin, he gets the message "You're not allowed to use a Javelin", or something. Then the Javelin is given back to the dead player. I.e. arrays of allowedInventoryToPickup per slot, and one allowedInventoryToLoose per slot? Might need to be brainstormed further.

5) Parameters that can be accessed and changed by outside scripts. In early Dominatrix I allowed 4 respawns per remaining target when the player joined, pluss two extra lives for the early joiners. But I was never able to access the script variables properly and provide a dialog that showed the remaining number of lives. I.e. I would have liked to punish team killers by removing lives (although now I would just jail their ass, doubling their jail time every time).

6) If medic is in play, but everyone can revive, the player should always start out with a hefty bit of damage to reduce his combat effectiveness. They'd better have an ambulance with them at least.

7) If medic are not in play, the respawn timers can be halved or something, for selected slots (my snipers might not get this benefit).

8) A modular system where the mission designer adds a variable. This variable informs the revive system how respawn will take place. I can have a barracks in the base with setting the variable to a fixed value for position and direction. Or I can add an MHQ that is updated on each getOut that will update the respawn marker. Or maybe add it just to a flag pole. Markers of variables, not sure what is the best approach. But if markers, the mission designer should have full control over which marker is used. Basically, it should be simple for me to define new respawn points of various types, and control of they are available or not.

Sorry for a lot, just throwing in some ideas. Haven't really played revive missions since ACE, and I'm sure a lot of new cool stuff has appeared since then.

[GLT] Legislator
Jun 12 2009, 09:17
I hope whatever norrin is gonna create, he keeps the way with the optional feature scenario of the old revive_init.sqf ;) That's the absolute basic of everything.

horror1
Jun 12 2009, 10:16
norrin, your script works perfect in arma2 , however the camera dont seem to work properly but thats not so dramatic, everything else works just great:)
i played yesterday with some dudes in a afghanvillage mission i created in arma2 with your script ai disabled and 1 respawn point after all get killed and it worked awsome:D
your script adds sooooo much more intensity into arma1 and 2 that i wont play any mission in mp without your revive script ;)

vengeance1
Jun 12 2009, 13:24
Good Job Norrin, don't forget the Respawn Vehicle if you can and controllable Respawn Points based on Mission Objectives met.

gonza
Jun 13 2009, 07:22
excellent news

I will be your beta tester

I have got you in my Msn so tell me if you want
I'am working on VTS3 so I will add your revive script in it

gnarly_rider
Jun 14 2009, 05:42
Hey Norrin,

I'm with ZSU, Preacher asked me to post any thoughts about your script over here. Firstly, full kudo's to your work, it makes our games fun while still being tactically challenging, and removes the dreaded conveyor belt syndrome.

Secondly, I know NOTHING about scripting, and have not been following the Revive discussions at all, so I have no idea about the functionality available to the mission designer at all.

ZSU is in the midst of discussions re revive handling primarily for ARMA2, so below is my two cents worth, pretty much a copy and paste form a ZSU post I made. Note that much is specific to our clan, which generally has two or three fireteams of about 4 members, plus an overall Squad leader and over Squad medic. Note also that this is not criticism of the Revive script, we just are looking at ways to balance realism, tactical teamwork, fun and quality gameplay time (last one is a big issue for mature gamers...)

" Must admit that this is the bit the annoys me about Revive, there really isn't a penalty for dying if anyone can revive you, and you are pretty much instantaneously back to full health straight away. I do like the penalties that ACE applies post revive (intermittent black outs, poor aim, etc) until you've seen a proper medic.

The gameplay aspects I enjoy and want to see promoted are:

1/. Teamwork
2/. No conveyor belt
3/. Significant enough penalty for being 'killed' without ruining our precious 2 or 3 hours of gaming time (which for a few of us is almost all we have a week, so it is very precious, and as someone commented, becomes non fun if you are spending even 10% of that time waiting for transport back to the 'front')

So, borrowing a number of current ZSU thoughts:

1/. One Squad level medic as presently, he/she is the ONLY one with full revive capabilities as currently implemented

2/. Each fire team has a 'field-medic', who has only partial revive skills. Basically can get a downed member back up, but partially revived member is solely stabilized (ie very vulnerable to further fire), experiencing say intermittent blackouts etc. Perhaps the revive timer would therefore be shortened to say 2 minutes, which places heavy emphasis on a fireteam to work and stay together (rather than individual members playing autonomously), so if someone does go down, fireteam medic can get to them quickly. Once member is back up, they can function in a very limited state, but still require squad medic to restore them to full health (or visit to field hospital). Optionally, if blackouts and vunerablity are all a bit too serious, something like movement restricted to crawl speed or something... 'Injured' player can still shoot fine, but can go nowhere fast, strong motivation to get squad medic there or injured into vehicle to visit squad medic nearby.)

3/. NO other players have any kind of revive ability

4/. All roles above would be gear independent (ie ignore the ACE bandages/IV/etc gear issue: they are role specific)

5/. If a team member does go down, it is likely to lead to the real life situation where the fireteam forms a defensive perimeter on the fallen person while the team medic partially revives, and then holds position till squad medic visits. I like this idea, because the current revive really doesn't promote this team work: anyone can wander of as a solo individual to revive multiple players, without little need for cover or defensive work (a 15 second unconscious->full health process is a low risk proposition.

6/. This allows teams to function more independently, because the team medics keep them functional. The team medic is therefore a high value item, and needs to play accordingly: if he/she goes down, the team becomes that much more vulnerable, requiring the squad medic to be nearby, therefore limiting their maneuverability. Team medics need to stay back a bit from the action

7/. Similarly, squad medic is very very important: if he/she goes down, can still be partially revived by team medic, but will need transport to field hospital to get working fully again. NO solo runs into hot territory for a squad medic (ahem!!! ;D)

My 3 dollars worth....

Again, as I said I have no idea where you are currently at with your script, so these are just my isolated ideas with no reference to existing comments in this thread at all

norrin
Jun 14 2009, 08:09
Revive Alpha

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

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

There's no thank yous or implementation notes yet but you set it up in your mission just like the old system eg gamelogic called, respawn_west, boot_hill server etc. You can 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

Once I get the implementation notes sorted I'll make a proper post and update the first post in the thread.

Also thank you to everyone that has made suggestions I'll try to get as many of these options implemented over the coming months.

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 :)

EDIT: Please post any bugs/issues with the scripts here: http://dev-heaven.net/projects/norrin/issues

[GLT] Legislator
Jun 14 2009, 19:37
Very nice! I will upgrade my first missions with it! :)

But I've got one wish. I'd like to give the ingame revive + animations + body drag a chance. I know it's buggy right now but BIS will fix this. Could you please create an option so that mission designers can choose between the classic animation/drag and the ArmA II internal?

norrin
Jun 15 2009, 12:39
Revive script update

Get it here: http://norrin.org/downloads/ArmA2/revive/AI_enabled/ArmA2_revive01d.utes.rar

Fixes:
Dialog errors
ArmA report errors relating to duplicate weapons and NORRN_variables
Reduced size of the sounds folder
Fix for mobile respawn vehicle thanks to vengeance1

Note: There's still a couple of dialog errors that appear in the report that I need to work on.

MattXR
Jun 15 2009, 12:51
Yeah i hope Kegetys gets a spectator script made soon! :D

Tophe
Jun 15 2009, 22:45
Great work Norrin. You're a star!

gonza
Jun 16 2009, 11:31
I have added the revive script 01d in my live coop mission editor (VTS3)
and we have tried it with some friends last night

it work well
I report just some little bugs

1- one player use all is count of revive but was not dead (he just respawn at base)
2- I have moved the respawn mobile (tent) but the tent become invisible after a time and so I was unable to move it after that but the marker stay visible and the respawn on mobile work always
3- drag body don't work (the animation start but the inconsiouss body stay at the same place
4- one time, a player lost is weapons after revive (replace by standard weapons)

we were 5 players last night and we use each 7 revive (in Arma2 AI are really goods :D )
and all dead dialogue work well




great job Norrin

I am waiting to the spectating script to (to add it in VTS3)

kegetys were are you ? :)

norrin
Jun 16 2009, 11:53
Thanks for the feedback mate. For the drag action make sure you are not using the drag/carry logic from ARmA2 as the the logic and the revive carry actions conflict. Will test the other probs over the next couple of days.

gonza
Jun 16 2009, 12:03
no I am sure that I don't use it

I just use animals gamelogic

but I have tried it only one time

norrin
Jun 16 2009, 12:27
NPs I'll test the drag function and see what happens - I may not have tried dragging another player yet only AI. I thought for the time being until Keg's new spectator script is out that I might make a simpler version of the unconscious camera script called "dead cam" so that players can still spectate when they have run out of lives.

EDIT: Found the reason for the player respawning once he has run out of lives and its a simple syntax error. On the end of line 679 of the revive_player.sqf there is a colon not a semi -colon, the correct line should look like this
_name setVariable ["NORRN_life_bonus", 0, true];

MCPXXL
Jun 16 2009, 16:09
Hi Mate

Found a small thing

When dead choose a respawnpoint the shown map will move to its position.
Now press go back and choose another one, map will not move to the new position


Emmi

[GLT] Legislator
Jun 16 2009, 19:09
Norrin, I noticed some entries in the ArmA2.rpt during JIP. Maybe it'll help you:


Error loading control mpmissions\__CUR_MP.utes\description.ext/Respawn_button_3b/Respawn_1b/
Error loading control mpmissions\__CUR_MP.utes\description.ext/Respawn_button_3b/Respawn_2b/
Error loading control mpmissions\__CUR_MP.utes\description.ext/Respawn_button_3b/Respawn_3b/

Edit:
Players reported that they lost their weapons after respawn again. All players died, all players hit the second respawn button, all players lost their weapons.

norrin
Jun 16 2009, 23:15
Thanks guys keep those bug reports coming :)

Has anybody else had problems with the drag action?

@<hidden> Legislator - yeah I'm aware that there are still some ArmA2 report errors caused by the dialogs. I've managed to reduce them but any dialog that appears as a button is still causing an error. Here's the code I'm using for the buttons
class Help_1 {
access = ReadAndWrite;
idc = 5;
type = CT_BUTTON;
style = ST_CENTRE;
font = "TahomaB";
sizeEx = 0.022;
colorText[] = { 0, 0, 0, 1 };
colorDisabled[] = { 0, 0, 1, 0.7 };
colorBackground[] = { 1, 1, 1, 0.5 };
colorBackgroundDisabled[] = { 1, 1, 1, 0.5 };
colorBackgroundActive[] = { 0.5, 0.5, 0.5, 0.5 };
offsetX = 0.003;
offsetY = 0.003;
offsetPressedX = 0.002;
offsetPressedY = 0.002;
colorFocused[] = { 0.31, 0.31, 0.31, 0.31 };
colorShadow[] = { 0, 0, 0, 0.5 };
colorBorder[] = { 0.5, 0.5, 0.5, 0.5 };
borderSize = 0;
soundEnter[] = { "", 0, 1 }; // no sound
soundPush[] = { "", 0, 1 };
soundClick[] = { "", 0, 1 };
soundEscape[] = { "", 0, 1 };
x = 0.02; y = 0.10;
w = 0.11; h = 0.04;
text = "Call for Help";
action = "[] call Norrn_Call4Help";
}; If anybody knows what needs to be done to fix this please let me know.

One other thing, what was your _respawn_at_base_addWeapons option set to in the revive_init.sqf? Also did they respawn with no weapons or the default load-out? This will help me track down the weapon respawn error.

@<hidden> MC - will get it sorted mate. The AI_disabled only version is still on the way, just waiting till I get my second copy of the game as it will help me test enormously as I'm getting a "CD key already in use" error whenever I try and connect two instances of ArmA2 to a local server - unlike ArmA.

Finally, does anybody know of a new command (eg AIdisabled") that will let you determine whether the AI has been disabled or not?

vengeance1
Jun 17 2009, 00:57
Norrin,

Only weapon loss I ran across was this:

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

When all of us died in Water I respawned using Menu after washing ashore and had my weapons, all my AI timed out and respawned without weapons. Not sure if it was like that before or not in ARMA1.

Also may want to consider a word change on call out for "@<hidden>##damit Out of Ammo";)

norrin
Jun 17 2009, 01:57
Thanks Vengeance. As for the out of ammo call-out I checked but I don't think thats part of my scripts, it might be incorporated as part of the game though.

vengeance1
Jun 17 2009, 04:27
Hmm, wonder if that is something the editor can get at?

Anyway I ran into several errors in that same mission I sent you tonight. I was reviving an AI and others were respawning timed out. I lost all voice commands to AI and had several ReVive and Drag Addactions that would not go away. Tried leaving and rejoining server but still no voices for AI command.

I checked the Server Report and had tons of sound errors
Error: sample ca\sounds\vehicles\wheeled\hmmwv\ext\engine_on1.wss with unsupported sample frequency: 44100
I was using the @<hidden> I will test again without using it.

only a few of these;
Error: sample mpmissions\__cur_mp.chernarus\revive_sqf\sound\univ_v10.ogg with unsupported sample frequency: 16000

[GLT] Legislator
Jun 17 2009, 04:43
One other thing, what was your _respawn_at_base_addWeapons option set to in the revive_init.sqf? Also did they respawn with no weapons or the default load-out? This will help me track down the weapon respawn error.


The array was empty and players didn't have the standard weapons. I removed every weapon via removeAllWeapons this; and set them up with silenced weapons. It's the mission Utes Invasion I where they noticed this. I wasn't there at the moment.

norrin
Jun 17 2009, 06:08
@<hidden>

All the sound errors relating to an unsupported sample frequency: 44100 Hz are not caused by the revive scripts as I converted all the call-out sizes to 16000 to save on size (so these ones are revive related). I haven't managed to get sound errors in my ArmA2 report yet so is there some other addon that may be causing this error? Can you give me any other info on what was occurring when the revive and drag actions would not disappear as this should be not able to happen the way the scripts are set up, eg were you attempting to revive a unit and it respawned during the process? Was there any lag (eg massive drop in frame rates) etc

EDIT may have found the cause of the multiple revive actions.

tomcat_
Jun 17 2009, 06:30
hi m8....thanks for your effort and hard work on this....arma was very enjoyable with your revive script.

Just to let you know that i'm willing to start another database of revive missions for Arma2 and of course plenty of testing..

just two requests and one question:

1. Is it possible on the revive script to have the option to disable respawn and also to disable JIP if you quit and join again...or with a number of rejoins?
2. Is the script for JIP next to the leader could be working better in Arma2? I have seen from the campaign that the leader is switching to another person if the leader is unconscious.
3. Arma2 on its engine has some sort of revive, drag, carry etc...and some nice effects when someone is unconscious....would that hardcoding will make the revive script work better in arma2?

Thanks...and please keep those revive missions going...:)

MCPXXL
Jun 17 2009, 12:20
Hi Norrin

I would prever a solution like you did now.
If there is no AI in the mission or i disableai=1 it runs also.
Why making x versions ? when it is not needed ...
If there are some option that can´t run i would prefer to make them parameters as you did "one or two" loool

This tool is not for a beginner so more params should not bring more problems and no versions discussions in the future.

Emmi

vengeance1
Jun 17 2009, 13:04
@<hidden>

All the sound errors relating to an unsupported sample frequency: 44100 Hz are not caused by the revive scripts as I converted all the call-out sizes to 16000 to save on size (so these ones are revive related). I haven't managed to get sound errors in my ArmA2 report yet so is there some other addon that may be causing this error? Can you give me any other info on what was occurring when the revive and drag actions would not disappear as this should be not able to happen the way the scripts are set up, eg were you attempting to revive a unit and it respawned during the process? Was there any lag (eg massive drop in frame rates) etc

EDIT may have found the cause of the multiple revive actions.

Group had just all got wasted in vehilces by a KA52, Yes I was in the middle of Reviving a unit and it revived correctly the others were timing out and respawning at closest base "Mobile".
Sound: as I put just below 44100 sound errors "I was using the @<hidden>". There was great LAG for a while during the process.

norrin
Jun 17 2009, 23:48
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

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

Dead Kennedy
Jun 18 2009, 10:38
Can i with your script enable revive not everywhere, but in specias places? Only near the MASH for example?

norrin
Jun 18 2009, 11:03
Can i with your script enable revive not everywhere, but in specias places? Only near the MASH for example?

I'm just in the process of adding some code that will allow you to do that.

Dead Kennedy
Jun 18 2009, 22:00
Thank you. One more question - can i use revive with both sides in "PvP-coop" mission with players on both west and east side?

I have marked all playable units in NORRN_player_units in array, set _enemy_side_1 to "EAST", alied 1 and 2 - to "WEST".

Revive works only on WEST side. On EAST side spectator cam works, but unit cannot be revived.

What i doing incorrect?

norrin
Jun 18 2009, 23:09
It is possible but its a little more complicated than that when using two sides unfortunately - essentially you need a second revive_init.sqf for the east units amongst other things. I've got some notes on how to do this at home (currently at work) I'll post them first chance I get.

Mr Burns
Jun 19 2009, 16:49
I cannot believe that i missed this until now :eek:

Thank you so much! This will boost our MP experience like nothing else :yay:

norrin
Jun 19 2009, 23:14
@<hidden>

I haven't tried this in ArmA2 yet but this used to work in ArmA (I can send you an ArmA mission if you're interested where this has been used).

1. Change the code in the init.sqf to look something like this:




//Initialise revive script

_players_west = [w1, w2];
_players_east = [e1, e2];


if (!isServer) then {waitUntil {!isNull player}};
if (player in _players_west) then {server execVM "revive_init.sqf"};
if (player in _players_east) then {server execVM "revive_init_east.sqf"};2. In the player_west array put the names of the west units but without the quotes eg w1 instead of “w1”. Do the same for the opfor units in the player_east array.

3. Then copy the revive_init.sqf and call it revive_init_east.sqf. In this file put the names of the respawn points and the east players etc like you’d normally do for the west units.

Note: only one side can use the mobile respawn point, actually not sure about this probably better not to use this function

Update on the next version
New optional features:
* Teamkill loss of life function - taken from old AI-disabled script
* Bonus life or reviving others function - taken from old AI-disabled script
* Carry unconscious units on shoulders
* CASEvac function - You can now take an unconscious unit to a configurable building type and it will be revived
* Medpacks needed to revive others
* Bleeding and bandages
* Med supplies replenishable from med tents and mobile MASHs
* Simple spectator cam to replace Kegetys ArmA spectator script once all lives used

The code for all these features is now implemented just need to test to see if its all working as it should so hopefully sometime late week

Nephris1
Jun 20 2009, 22:14
Hi Norrin,thx for ya work m8.
Just a "quick" question, is it possible as your script is,to get a kind of Respawn pool?
E.g. a group of 4 on the battlefield.
After the last one died, the last possibilty to revive any comnrade is gone, the respawn kicks in and make the complete group respawn toghether at point X.

norrin
Jun 21 2009, 12:37
@<hidden> - I'm sorry mate but I'm not entirely sure what you're asking, however, you can set up the revive scripts so that if all the players are unconscious they respawn at a specific spawn point or at the players choice of respawn points.

New version update
The new version is essentially finished - just need to run some final tests on a dedicated server to check everything is working.

Dead Kennedy
Jun 22 2009, 10:35
norrin, thank you a lot! :)

norrin
Jun 23 2009, 05:52
Revive Update (version 0.2)

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_revive02.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. [0] 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

[GLT] Legislator
Jun 23 2009, 08:15
Thank you! :yay:

I'll update my missions with it as soon as I've fixed the briefing task issues with my team.

vengeance1
Jun 23 2009, 13:21
Revive Update (version 0.2)

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



No reason to apoligize that is what Beta means, TESTING. Nice work NORRIN, getting better all the time.

norrin
Jun 24 2009, 12:55
Revive Update (version 0.2b)

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

Fixes
Numerous small fixes and improved JIP compatibility for both AI enabled and disabled

If you are already using version 0.2 just replace the revive_sqf subfolder in your mission folder with the one in the rar file.

Uzii
Jun 24 2009, 13:02
Was a big fan of your work on ArmA, and now getting back into mission making.

I'm having problems though. I'm using the Guerilla faction as my playable units, named and listed in the .sqf, but even when I use "Man" in the units that can be and can revive, the playable units die. They go to the prone/unarmed position, but die straight away.

It displays the number of lives, and 'Joining Mission' at the beginning, the Game Logic object 'Server' is present, along with the Respawn_west, Boot_Hill, and center markers.

I've tried WEST, RESISTANCE, and GUER as the friendly sides, none of which work.

Here's a copy of my .sqf file. Its probably something really simple that I've missed, its been a long time since I've made a map and I'm rusty as hell.

Thanks

/*
ARMA2 REVIVE SCRIPT - AI enabled or disabled

© JUNE 2009 - norrin (norrin@<hidden>)

Version: 0.1 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 = 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 = 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 = ["x1","x2","x3","x4","x5","x6","x7","x8","x9","x10","x11","x12"];
// ==================================================================
// 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 = 1000; //array no.38 - Number of lives per unit
_JIP_respawns = 0; //array no.63 - NOT IMPLEMENTED
_revive_timer = 0; //array no.7 - Whether you want to limit the amount of timer a player has while unconscious
_revive_time_limit = 180; //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 = [0, ["MASH"]]; //array no.64 - Allows units to be taken to a hospital etc to be revived
_mediVAC = []; //array no.65 - NOT IMPLEMENTED
_chance_ofDeath = []; //array no.66 - NOT IMPLEMENTED
_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 - NOT IMPLEMENTED - leave as 0 - whether a unit can spectate other friendly units when it has run out of lives
// ==================================================================
// RESPAWN OPTIONS
_no_respawn_points = 0; //array no.12 - no of respawn points (Max number 4)
_Base_1 = ""; //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 = 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 = []; //array no.68 - NOT IMPLEMENTED
_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 = "Man"; //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 = "Man"; //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 = 0; //array no.80 - Give units a limited number of revive kits
_stabilisation = 0; //array no.81 - NOT IMPLEMENTED
_bleeding = 0; //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 = "GUER"; //array no.42 - Friendly sides can be "EAST", "WEST","RESISTANCE" etc.
_allied_side_2 = "GUER"; //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 = 0; //array no.1 - whether a respawn dialog appears when all players are unconscious (_all_dead_player = 1)
_respawn_button_timer = 20; //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 = 0; //array no.96 - specify whether a unit receives bonus lives for reviving other players
_revives_required = 0; //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 = 0; //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)
// ==================================================================
// 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];

// start related revive functions
[] execVM "revive_sqf\init_related_scripts.sqf";

if (true) exitWith {};
//Last edited 12/06/09

norrin
Jun 24 2009, 13:16
Hi Uzii,

First make sure you update to the latest version of the revive ie. the just released 0.2b: http://norrin.org/downloads/ArmA2/revive/AI_enabled/ArmA2_revive02b.utes.rar If you're already using version 2 all you need to do to update is to replace the revive_sqf in your mission folder with the one in the 0.2b rar file.

There's now some implementation notes contained in the rar file so these should explain what all the new features do. It doesn't sound like a unit definition problem but more like you haven't created a gamelogic called "server" in the editor. If you've already done this and still having problems please send me your mission and a list of any addons you've used to here (norrin@<hidden>) and I'll take a look at it.

best wishes,

norrin

Uzii
Jun 24 2009, 13:32
Cheers for the quick reply, as I suspected, it was my stupidity. Forgot/didn't bother to put the description in. Whoops. Great work so far, glad to see we've got the drag/carry animations from the game. Keep it up :ok:

MadTommy
Jun 26 2009, 10:59
Thanks norrin, seems like a great addon...

I've implemented this into a mission of mine.. prior to fully tweaking it and adjusting some of the many settings i wanted to test it... however i'm running into a little problem that has me a little miffed.

When i 1st choose a unit and spawn in i'm met with a black screen and a messages that reads: "Unit selected is unconscious please press escape, return to the menu and choose another playable unit".

However my player is not unconscious.. i can still fire and run around.. its just the screen is black. Also when i press escape i can see the player standing where he spawned as expected. The really odd thing is... if i 'suspend' and then try again with the same slot/player selected it will work and i can spawn and see again, as it were.

Any ideas?

norrin
Jun 26 2009, 12:06
Make sure that the respawn marker eg. "respawn_west" is no where near where the playable units are placed in the editor. In the last version I added a check so that if the units are within 200 metres of respawn_west when you join the mission then the script thinks they are unconscious. If you're still having problems then please let me know.

MadTommy
Jun 26 2009, 13:24
^^ that will be it..they are within 200m.

Thanks

edit: all working.. now I need to work out a new layout ala my starting position and respawn locations...200m is quite a long distance in regards to my mission.. :)

norrin
Jun 29 2009, 01:53
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

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

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 :)

Tophe
Jun 29 2009, 07:11
Thank you Norrin! You're awesome.

MadTommy
Jun 29 2009, 09:51
Cheers mate. :)

Nice tweaks & improvements.

[GLT] Legislator
Jun 29 2009, 10:01
Excellent! Can't wait to test it.

Norrin, could you please create a pbo-version of your script as well? I know it means hard repathing of every single script, but it shouldn't be a huge problem for a good script editor. I can give you an example pbo of an older version of your script. This way it's easier to update missions and of course it's easier to update the script itself! Creating a pbo version doesn't mean it'll run in every mission by default, it just centers the work and keeps the missions smaller.

norrin
Jun 29 2009, 10:20
@<hidden>

Yeah I will mate and I understand all the reasons why you want such a beast and think its a good idea, but there are also a couple of pervasive reasons for a scripted version as well:

1. Missions can be played without addons so anybody with vanilla ArmA2 can use missions with revive
2. With future updates all you need to do is replace the revive_sqf folder with the latest release and in some instances also change some of the parameters in the revive_init.sqf - you going to still have to change these parameters in each individual mission even if I make an addon version - I'm also trying to document the code updates so you can adjust the settings of your existing files to fit in with the new versions of the script.

In either case there's still quite a few features to add so I won't be making an addon version just yet as I'm trying to avoid working on 2 versions of the code but once everything is added and the code is as bug free as possible then I'll set it up.

Revive 0.2C - http://norrin.org/downloads/ArmA2/revive/AI_enabled/ArmA2_revive02c.utes.rar

[GLT] Legislator
Jun 29 2009, 11:18
Players can still play Vanilla ArmA II with the pbo version ;) It doesn't need to be a required addon in a config.cpp because it's only needed anyway when there is a revive_init.sqf. The client doesn't need the pbo, only the server.

I know there is still need of the revive_init.sqf but that's not the problem. It's for the mission makers own sake to use the same notations all over again, like p1 for the player name 1 etc. Most settings don't differ anyway if they're set how they're wanted.

bravo 6
Jun 29 2009, 11:34
@<hidden> is it possible to use more and diferent animations, some of the new ArmA2 animations and randomly for the moment when the soldier is lying in the ground waiting to be revived?

It would be and look more natural if the soldiers were in a more normal position (unconscious position) when waiting to be revived.
The custom and the normal used animation with the hands near to the head lying with face down looks like the player is conscious and waiting as hostage. Would be nice if you could improve this feeling with the available animations from ArmA2.

I have not tried your work for ArmA2 yet, but i will as soon as i get ArmA2.

Keep up the Good work.
Good luck, and good inspirations!

[GLT] Legislator
Jun 29 2009, 11:59
Yeah some new animations would be cool. Norrin, you could use the "mission" Animation Viewe (http://www.armaholic.com/page.php?id=6056) made by Clayman in order to find some good animations very fast. ;) It's on my to-do-list as well. I don't know if they included the injured-animation of Queens Gambit in ArmA II, but I've already seen some dancing-animations.

norrin
Jun 29 2009, 12:06
@<hidden> - I've already incorporated the drag and carry animations from ArmA2 into the script mate but although I've added part of the ArmA2 injured sequence you're right the unconscious animations could do with some work so I'll see what I can do.

@<hidden> - don't worry mate I'm convinced and as I said before I think its a very good idea but until everything is added and fixed its going to have to wait as it's simply so much easier for me to work with a script than an addon eg. I don't need to restart ArmA2 every time I change the code.

EDIT: No the QG injured animation doesn't work in ArmA2 and I already know what animations to use its just a matter of implementing them better: http://community.bistudio.com/wiki/ArmA2:_Moves

REVIVE Script (0.2C): http://norrin.org/downloads/ArmA2/revive/AI_enabled/ArmA2_revive02c.utes.rar

Nephris1
Jun 29 2009, 14:54
Edit:
I got a crash/desnch after getting revived via a human player
Following the rpt entry


mpmissions\co5_Ute_Airfield8_02c.utes\description.ext/rev_cam_dialog/Help_1/
mpmissions\co5_Ute_Airfield8_02c.utes\description.ext/rev_cam_dialog/Dialog_fade/
(this case on a list server, means i hosted it)

norrin
Jun 29 2009, 21:17
Thanks for the report Nephris. The dialog errors are known errors and will pop-up in the report every time these dialogs appear while using the script. I'm not sure how to fix them at this point but the good news is they don't seem to affect the script or cause it to crash. I also get the occasional crash to desktop when playing ArmA2, not only when playing revive missions, and this part of the revive code is virtually unchanged from the ARmA version so I'm hoping this is just a once off error/coincidence - if it keeps happening or you have more information on the sequence of events that caused it please let me know ASAP.

Many thanks,

norrin

[GLT] Legislator
Jun 29 2009, 22:12
I've found a bug using Revive 0.2. I was playing the non-vehicle mobile respawn unit. I deployed the mobile respawn tent but later on I couldn't stove it anymore. Didn't get any action menu entry. The only that happened to me was a healing (no revive healing/revive action, simple healing action) by an AI medic under my command.

There were lots of ArmA2.rpt entries. You should check this out: http://arma.pastebin.com/m73410589

norrin
Jun 29 2009, 23:04
@<hidden> - 99% of those report entries have nothing to do with the revive scripts, are you using an addon that maybe causing conflicts with ArmA2 maybe a sound addon. The fnc_houseEffects.sqf module also seems to be throwing up quite a few errors. That being said there does seem to be an error in revive_init.sqf and the revive_player.sqf (lines 643 and 646) but so far I cannot replicate either report error in my own tests and the code looks OK. Makes me wonder whether there's either a config error in the revive_Init, so if you like send me your mission and and I'll take a look at it, or there's a conflict with an addon or another script. I'll also try and replicate the bug with the mobile spawn and see if I can track down whats going wrong but for the reasons above it maybe beyond my control.

[GLT] Legislator
Jun 30 2009, 05:45
I know there are plenty of entries. ArmA II is a really huge construction site. As you can see in line 406 there are no other mods loaded.

Everything beneath line 406 took place while starting a custom mission in an own hosted mp session. No other scripts where running except for some of the ArmA II modules including the civilians module, the animal module, the civilian cars module, the surrendering module, the ambient combat module and the military symbols module (not working so far).

Maybe they're "doing" to my players that are named p1 to p20. AI was enabled on the player slots. So far, everything else worked - the camera, reviving, respawning at the markers.

There is a revive error starting in line 3498 for example. Another one in 3740.

Few of the errors are caused by myself. I don't know why yet. Seems like ArmA II is deleting the variable status. *guessed*

norrin
Jun 30 2009, 06:26
I'm sorry if I missed the addons line in the 4000 line error report that you posted, but I was really only trying to identify errors that related to the revive script. The errors you are referring to on lines are 3498 etc correspond to lines 643 and 646 of the revive_player.sqf code so we are talking about the same errors. There's also an error with param2 that may or may not be related to the revive_init but without seeing your mission I cannot track this. As I said, in my tests with up to 8 playable AI on a dedicated server with 2 players I have seen no problems with the code in these lines.

Either way something other than the revive scripts is causing a hell of a lot of errors in your mission and I cannot be certain whether there are flow on effects to the revive scripts.

There's a number of things you can try that will help us track down the problem.
1. Remove the modules 1 at a time to see if one is causing most of the errors - if there is then does the revive still cause these errors. There may also be a conflict between the code in one of the modules and the revive scripts - this would be very helpful to know. In my own tests using the civilian module, civ car module and the animals modules I haven't seen a conflict with the revive scripts - so these are probably OK. Maybe start by removing the symbols module as if this isn't working in MP it may be causing the errors.
2. Reduce the number of playable AI on the map as you may have reached a theoretical limit for AI enabled missions - as the revive scripts require an instance of the scripts running for each playable unit and these are fairly complex scripts then either the client who is group leader or the dedicated server will have a greatly increased CPU load, and this may be causing lag and the scripts or modules to function incorrectly - NB this is quite different if the AI is disabled as only a single copy of the scripts have to run on each clients PC.
3. Send me your mission so I can also check the settings and try and track down whats going on myself.

Legis, please don't get me wrong as I greatly appreciate your help with testing these scripts - its just I need to be sure that the bugs I'm looking for are really caused by the revive scripts otherwise I'm chasing my own tail. I also need to be able to replicate the errors to fix them so any info about where the units were, exactly what happened to the unit etc when the error appeared is incrediably useful. For instance, I'm not even sure if the errors appeared every time a unit fell unconscious?

EDIT: Just checked your report again and the error doesn't occur every time that a playable AI unit dies only on certain occasions. Is there anything special you remember about the occasions that the error refers to?

[GLT] Legislator
Jun 30 2009, 06:35
I fully understand you ;) We're sitting in the same boat. Trying to track down errors in the ArmA2.rpt for anything is hard work right now. I'll have a look into it again, maybe this evening, maybe tomorrow. Performance was ok so far although there were 20 AI units reviving each other all the time. The only thing that didn't work was the mobile respawn tent that I couldn't take with me anymore. But it was the first time in ArmA II it ever happened. I'll keep an eye on it. You can get the mission as soon as I've done my tests :o Increased fps by 10-15 so far by deleting some objects :o I need to do more improvements first.

gonza
Jun 30 2009, 11:14
Hello
little bugs found last night

1-when I was inconscious I have changed camera to watch a friend
when this friend was killed, combos (choose player) and counter have disappear, the carmera have stayed at the last position and I was enable to do something (key escape don't work)

2-I have respawn on "Respawn_west" marker 1 time (I don't know Why)

3-revive script don't work after a save/restore Mpmision


Bye

Thanks norrin , you are my Hero

VanhA-ICON
Jul 3 2009, 07:11
Hello
little bugs found last night

1-when I was inconscious I have changed camera to watch a friend
when this friend was killed, combos (choose player) and counter have disappear, the carmera have stayed at the last position and I was enable to do something (key escape don't work)

2-I have respawn on "Respawn_west" marker 1 time (I don't know Why)

3-revive script don't work after a save/restore Mpmision


Bye

Thanks norrin , you are my Hero

This is also most common glitch that we encountered 3 times last time whilst playing.
Followed a team-mate with camera when he was on the way to revive me. He got shot and I lost control of all buttons. Could not Esc from it so had to boot the whole game and then come back.

norrin
Jul 3 2009, 07:43
There's a new version of the script on its way that fixes this bug. Just need to do a little more testing before I release it. If all goes well I'll have it posted in a few hours.

[GLT] Legislator
Jul 3 2009, 07:52
Hi norrin, remember the mobile respawn issues I had? They never occured again so far, but yesterday I noticed a new problem. One of my AI soldiers wasn't revived correctly. His real body remained around 11 km at respawn_west so he couldn't join the team anymore. There was no way to force him back into the team. I don't what happened to his fake body because I took the other 19 AI soldiers over a huge combat area.

norrin
Jul 3 2009, 13:58
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

@<hidden> – not sure what’s happen with that lost AI mate. Please let me know if you come across it again or if you find some way to reproduce the bug consistently.

Nephris1
Jul 3 2009, 15:10
Hi m8
great effort on your script sop far.
So i got a question on the mobile respawn, is it possible to make a unit respawn in a vehicle?My special idea to this is, making a unit spawn in a plane ,so it can halo back to Battlefield.

vengeance1
Jul 3 2009, 15:20
Thanks NORRIN, will integrate it into some missions for testing.

MCPXXL
Jul 3 2009, 16:00
@<hidden>


Who NOT ????? loool

Nephris1
Jul 3 2009, 20:31
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....

norrin
Jul 3 2009, 21:24
Sry Norrin,
the new version doesnt work with reviving for me.
Dunno if i use wrong settings:

Send me your mission mate and I'll take a quick look. Oh and I like your idea about spawning on a plane, I will see what I can do.

Revive 0.2E: http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_02e.Chernarus.rar

gonza
Jul 4 2009, 08:36
Thanks norrin I will try it

vengeance1
Jul 4 2009, 14:45
Send me your mission mate and I'll take a quick look. Oh and I like your idea about spawning on a plane, I will see what I can do.

Revive 0.2E: http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_02e.Chernarus.rar

Hopefully we can use it to spawn on the LHD as well.:)

norrin
Jul 5 2009, 10:50
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.

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

vengeance1
Jul 5 2009, 14:14
You're da MAN! :yay:

[GLT] Legislator
Jul 5 2009, 21:30
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?

http://img30.imageshack.us/img30/2012/arma22009070522403892.th.jpg (http://img30.imageshack.us/i/arma22009070522403892.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.

http://img195.imageshack.us/img195/2945/arma22009070523071928.th.jpg (http://img195.imageshack.us/i/arma22009070523071928.jpg/)

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

http://img16.imageshack.us/img16/1649/arma22009070523080262.th.jpg (http://img16.imageshack.us/i/arma22009070523080262.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.

norrin
Jul 5 2009, 23:36
@<hidden> - 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

[GLT] Legislator
Jul 6 2009, 05:31
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.

norrin
Jul 7 2009, 00:44
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)

http://www.norrin.org/images/ArmA2/missions/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!

norrin
Jul 8 2009, 02:13
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.

vengeance1
Jul 9 2009, 00:02
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"};

norrin
Jul 9 2009, 03:29
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;

tomcat_
Jul 9 2009, 19:13
[i]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....

norrin
Jul 9 2009, 22:10
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.

Tophe
Jul 10 2009, 21:15
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?

vengeance1
Jul 10 2009, 22:46
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.

Dan86
Jul 11 2009, 16:46
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@<hidden>)

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

norrin
Jul 12 2009, 10:06
Sorry guys I've been away for a couple of days and only just got back.

@<hidden> - if your still having probs mate send your mission here (norrin@<hidden>) and I'll take a look.

@<hidden> - 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.

Dan86
Jul 12 2009, 16:30
Yep that fixed that issue, thanks Norrin for a great "must have" revive script and for your help.

[GLT] Legislator
Jul 13 2009, 20:21
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:
http://img141.imageshack.us/img141/8968/arma22009071321501628.th.jpg (http://img141.imageshack.us/i/arma22009071321501628.jpg/)

[GLT] Legislator
Jul 14 2009, 21:40
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

Nikov
Jul 15 2009, 01:27
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.

norrin
Jul 15 2009, 02:09
Just email your mission here (norrin@<hidden>) and I'll take a look, sounds really interesting. :)

Trenchfoot
Jul 15 2009, 04:22
I wonder if you could load bodies into an ambulance and bring them to a hospital point for a revive :)

norrin
Jul 15 2009, 06:10
I wonder if you could load bodies into an ambulance and bring them to a hospital point for a revive :)

That option is already available in the scripts - just make sure you have the _unconscious_drag, _CASevac and load_wounded functions enabled in the revive_init.sqf.

gonza
Jul 15 2009, 08:25
hello

I have found a bug last night 0.2i

1- when all dead players appear the screen blink

thanks

norrin
Jul 15 2009, 13:23
Revive Script Update 0.2J

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

Fixes
*Changes to the unconscious camera code to reduced scroll lagging while in free camera mode
* Changes to the mobile respawn code in an attempt to fix the bug identified by Legislator - ie. losing the ability to move spawn point following revive.

@<hidden> - not sure whether I've also fixed the blank screen bug when all players are dead but I've tested the camera changes quite a bit on a local and a dedicated server and so far haven't been able to trigger the bug.

@<hidden> - the bug with the AI not coming to revive has been around for a long time and I'm not sure what causes it as I haven't been able to reliably trigger it. I've always wondered whether its got to do with AI pathfinding and being close to walls or something like that.

[GLT] Legislator
Jul 15 2009, 13:26
Hey thanks for the update! :)


I've always wondered whether its got to do with AI pathfinding and being close to walls or something like that.

I guess not ... it happened on a road western of Chernogorsk too. The weren't even houses nearby. But I agree it could have something to do with AI pathfinding. This bug occured not only when a player had be revived. It occures when AI revives AI too.

Joncool
Jul 15 2009, 23:57
Having kind of an odd issue, perhaps someone in here can help that has some experience with this script. (I'm relatively new to scripts)

I've gotten the revive script to work, however it only works for the first unit I spawn with. After that if respawn and switch to a different unit, that unit is unable to revive or be revived.

Any ideas?

norrin
Jul 16 2009, 00:21
@<hidden> - mate send your mission here (norrin@<hidden>) and I'll check it out as soon as I can.

Revive 0.2J: http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_02j.utes.rar

Joncool
Jul 16 2009, 00:41
Thanks man, but I think I figured it out in the meantime.

In order to switch slots I was saving and resuming the mission. For some reason when I did that, the revive script didn't load again.

MortenL
Jul 17 2009, 09:41
Been reading the script description and such but i am too much of a noob to customize it.

What i want is to:
Have the same firstaid abilities that i have with the modules
Have the ability to drag dead people
Have the ability to put them in a car (and take them out of it)
Have the ability, so that when they're transported within a marker they will either respawn or revive.
Have the ability to NOT being able to revive them on the field, but only in that specific marker/trigger. (but only when they're dead, i still want to be able to heal them if they're just partially hurt like with the modules)

Is this possible? All i see with the revive script is that you can revive your dead, but if they actually die they'll just respawn at the base, which is not what i want?

I even tried to add the files to my mission folder and change the init and so on, but all i get is the drag ability, i still cant revive or put them in vehicles or anything. :/

Sorry for bothering you so much.

norrin
Jul 17 2009, 10:03
Is this possible? All i see with the revive script is that you can revive your dead, but if they actually die they'll just respawn at the base, which is not what i want?
With a slight variation its possible - you can revive units at something like a MASH tent not at a marker. It sounds like your missing something from your set-up, if you like send your mission here (norrin@<hidden>) and I'll fix it up for you.

ahmedjbh
Jul 17 2009, 19:53
Norrin,

excellent job. I have managed to get it all working for the blufor and opfor, but cant for independant?

In the init file, what should i call them in this section _allied_side_1 "?"

I tried independant and guer, no joy.

edit:

The problem is when I start the game, it says unit unconscious etc, and i have a black screen.


edit2:

I got it working, i just used the word INDEPENDANT with capitals, in a fresh unpacked init file and it worked, something must have got corrupted in my old one.

Sorry for the false alarm.

Dai-San
Jul 19 2009, 11:23
Hi Norrin,

Great work, and being a beginner to scripting, way beyond me.

What myself and my fellow teammates are after is just the option to revive, no respawn. We would just like the option to allow maybe 1 respawn per player in case of that daft move or xray ai situation that occurs well into a mission.

Any idea if this can be implemented, and how?

Any help would be greatly appreciated mate.

Keep up the good work.

norrin
Jul 19 2009, 13:20
Revive Script update (Version 0.2K)

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

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 - @<hidden>, 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.

@<hidden> - that can be set up quite simply, just email your mission here (norrin@<hidden>) and I can set it up for you

Dai-San
Jul 19 2009, 16:36
Revive Script update (Version 0.2K)
@<hidden> - that can be set up quite simply, just email your mission here (norrin@<hidden>) and I can set it up for you

Cheers Norrin, missions not finished yet but when it is I will send it over.

Many Thanks

Uzii
Jul 19 2009, 17:23
@<hidden>
GUER is the independent side. The other bug is when you respawn markers and Boot_hill are too close to the players.


Norrin, my good man, I have a problem, actually two. I'm using a HALO drop to begin with and it all works fine, but JIP is heavily bugged. The units who HALO in are instantly killed when a player joins, and they spawn at Respawn_west. I think its the HALO sqf from the game that's messing it up, but I can't figure out how.

I've sent a copy of the mish to you, thanks again for all your work.

Also, the spectate script never seems to follow anyone other than the downed player, can't figure what I've done wrong with that one. Same thing happened on my last mission too.

Edit: I was using an older script, but none of the fixes mention my problem. (0.2i I think)

[GLT] Legislator
Jul 19 2009, 18:58
Thanks norrin :) Every release is a highlight to ArmA II :notworthy: I'll keep you up to date if I find any problem.

ahmedjbh
Jul 19 2009, 19:23
Uzii,

I thought that, but when I tried Guer, it didnt work, but using independant does.

I am currently using it ok, and all working, so Im happy!

Uzii
Jul 19 2009, 21:43
@<hidden>
Thats weird. I used GUER on my mish, and it worked OK too. Huh...

BelgarionNL
Jul 21 2009, 11:30
love it thx! i hope the SOM works better with this :)

and i like the readme! now even a noob like me can make it work :)

EDIT: when i die there is place to choose the respawn in a base or at the mash tent? i didn't even unpbo your mission :S

camus25555
Jul 22 2009, 02:31
awesome script thank you Norrin \o/

cm
Jul 22 2009, 04:18
Do I need to set up all those spawn points if I only want to revive on the field? What are the uses of it?

norrin
Jul 22 2009, 04:37
No you don't mate. You can set it up so the guys can only be revived or give them a time limit to be revived within. If this elapses the players can be made dead outright for the rest of the mission or you can give them a single or choice of respawn points to respawn at.

norrin
Jul 22 2009, 12:53
Revive Script Update (version 0.2L - 220709)

Exciting news for this update

Xeno has very kindly waved his magic optimisation wand over the code and added a rather liberal pinch of rationalisation dust. Cosmetically you won't notice any difference but under the hood Xeno has been tinkering away and hopefully the revive engine will be running quite a bit more smoothly.

In addition, Lester from Mapfact has sent me some fixes for the dialogs so now you should be able to view them correctly on a monitor of any aspect ratio.

So many thanks to you both :).

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

Note: If your mission is already using revive 0.2C+ then just replace the revive_sqf in your mission folder with the one in the rar file.

Fixes
* Finally fixed the acknowledgements in the readMe
* Made zoom for top down camera adjustable using the middle mouse wheel

Other notes
Just one other thing I'm going to be out of action for at least 2 weeks. During this time I will not be able to access the internet. So please if I don't respond to your emails or PMs, don't worry I will get back to you as soon as I can when I'm back online.

Speak to you then :)

[GLT] Legislator
Jul 22 2009, 12:59
Argh so that means I'm too late for another mini bug report? :(

Using Revive 0.2k the mobile respawn marker isn't hidden when I stowe away the tent. Deploying the tent again somewhere else moved the marker to its correct position, but still remained visible after stowing the tent again.

There is an old revive bug still in ArmA II :( A player died in an explosion (handgrenade) and got kicked out of the revive script staying at respawn_west. He had to reconnect to join the revive script again. Getting killed over and over again to trigger the revive didn't work.



Have much fun in those 2 weeks :yay:I hope it's some kind of vacation for you. :)

camus25555
Jul 23 2009, 04:25
i'm using your config.cpp file to add custom sound because if i use cfgsound in description, there is a conflict and game crash

cfgsound member already defined

so i did like this
class dt1
{
name="dt1";
sound[]={"\sound\dt1.ogg",0.05,1.0};
titles[]={};
};

everything is working except the sound is too low, i tried
sound[]={"\sound\dt1.ogg",db + 10 ,1.0};
but its not doing anything sound is still too low

norrin
Jul 23 2009, 09:58
Revive Script Update (ver 0.2M - 230709)

Do you ever feel like screaming "arghhhhhh"! For some reason I do all the time. Here's a couple more really annoying bugs fixed.

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

You know the drill just replace the revive_sqf folder in your mission with the one in the archive.

Fixes
* Hopefully fixed the irritating mobile respawn marker bug that Legislator was talking about
* Fixed the screen turning black when the revive timer elapses and _respawn_position = 2 in the revive_init.sqf - hopefully the map and the respawn buttons now appear.

@<hidden> - sorry haven't found your bug yet mate
@<hidden> - its been a very long time since I mucked around with sounds so I'm not entirely sure. My guess is to try something like:

class dt1
{
name="dt1";
sound[]={"\sound\dt1.ogg",0.5,1.0};
titles[]={};
};


That's it, I'm off. Speak to you again in a few weeks

Kremator
Jul 23 2009, 10:02
norrin,

This is excellent work mate ! It's also good to see other scripting gurus (of which you are one in my eyes) also helping out. Enjoy your time off !

Eclipse4349
Jul 25 2009, 01:19
is the version on the front page the most up to date version? Or do I have to go page by page trying to find any updated files? Thanks!

vengeance1
Jul 25 2009, 01:22
is the version on the front page the most up to date version? Or do I have to go page by page trying to find any updated files? Thanks!

The Version on the First Page is 0.2m and yes that is the latest version. ;)

Starlight
Jul 25 2009, 14:44
Ok I am struggling with this. There are so many switch options in the revive_init file :o

What i want is just the revive option to be available with the limited number of times as provided.

I cannot work out how to stop re-spawning :o

Can somebody help this noob out with what I need to do to disable the re-spawn option :D

chappy
Jul 26 2009, 01:38
I may have missed it in the 13 pages, but the only issue im seeing with this (fantastic) script is that on respawn or revive, the taskcomplete status is not up to date. it reloads the tasks and briefing but they arent checked off as complete or failed. (seperate issue is that if you have ai enabled in an MP mission , when they die/revive/respawn you end up duplicating the notes and tasks each time so end up with a massive list of replicated notes and tasks.

cm
Jul 26 2009, 22:14
FYI the game script is unplayable on large servers. I tried out 40 players and it was desyncing to a point where the game basically froze.

Anyone else tried large missions with the script?

ramenstyle
Jul 29 2009, 11:15
hey, i'm quite new to the arma2 editor and scripting but i'm getting it slowly.

i can't seem to work the revive script. i've copy and pasted description.ext, revive_init.sqf, revive_sqf folder, init.sqf to my mission folder and set 3 markers namely: "respawn_west", "boot_hill", and "center". i also had the game logic named, "server" in my mission. when i play my mission (a coop multiplayer mission), there is no limit to the number of revives (though you can select it before running the map in the hosting menu, as well as selecting the time -- but nothing happens) and when i do die, the player simply respawns after the 4 second delay instantly where my respawn_west marker was placed (again, with no limit). any help? i can't seem to figure it out. :(

[GLT] Legislator
Jul 29 2009, 11:23
Did you named the playable units? Have you entered the names of those units in the revive_init.sqf? Don't just copy & paste ;) Use it, adapt it, feel the revive flowing through your body :)

ramenstyle
Jul 29 2009, 11:25
yeah, actually i've been going around the readme and trying to edit the revive_init.sqf file for the passed few days but never really figured out what i was missing. now that you mentioned it, thanks! haha i'll give it a shot.

i just read through the readme and it gave me a basic step-by-step solution on how to get the script to work. thanks for the heads up though. :P

Starlight
Jul 29 2009, 11:27
Not sure how to help you, but check you have copied all the files and folders that came in the revive test mission.

If that fails, copy and paste the contents from the test mission into your own mission.

On a side note, I have been able to utilize the "USS Khe Sanh" respawn to make it a mobile HQ respawn point.

You can change the vehicle that you spawn into, just it must have internal cargo spaces, so the normal HQ vehicles will not work. If you then use the latest vehicle respawn script that is in one of the threads here, then it will respawn when destroyed and still work as the mobiel HQ.

I know its probably not the best way to get a mobile respawn, but it worked for me :D

Just need to work out how to get the marker to attach to the vehicle now?

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

Also I still do not know how to make it so that only the revive option is available, with no respawning :confused: any help appreciated

ramenstyle
Jul 29 2009, 11:29
@<hidden>: finally got it to work. haha thanks bro!:)

@<hidden>: thanks for the reply as well. i'm trying to implement mobile hq's in my mission as well. i'll check that out as well. :)

Starlight
Jul 29 2009, 19:22
Ok finally figured out how to make it only revive and its so simple I could kick myself :o just make the number of available respawn points =0 in the config

Also there is a Mobile HQ Respawn built into the script, actually reading the PDF in more detail explained how to set it up as a replacement for the mobile mash tent deployed from the squad leader.

The only thing is does is leave a dead wreck on the map from when its destroyed. Not sure what the best way is to police these, will the garbage module delete these? Previously I used the rather nice simple vehicle respawn script that removed the wreck when the vehicle respawned, not seen that option in the revive script yet unless I missed it :confused:

By the way what a fantastic bit of scripting :yay:

splatsh
Jul 31 2009, 22:37
Ok finally figured out how to make it only revive and its so simple I could kick myself :o just make the number of available respawn points =0 in the config

Also there is a Mobile HQ Respawn built into the script, actually reading the PDF in more detail explained how to set it up as a replacement for the mobile mash tent deployed from the squad leader.

The only thing is does is leave a dead wreck on the map from when its destroyed. Not sure what the best way is to police these, will the garbage module delete these? Previously I used the rather nice simple vehicle respawn script that removed the wreck when the vehicle respawned, not seen that option in the revive script yet unless I missed it :confused:

By the way what a fantastic bit of scripting :yay:

Are you talking about this script or do you talk about something built ingame?
And if you know stuff, please do let us know how and what you are doing.

---------- Post added at 10:37 PM ---------- Previous post was at 10:32 PM ----------

This script only works in multiplayer mode?

ahmedjbh
Aug 3 2009, 12:39
why i am so rubbish?

I can not seem to get this to work, I have got it to work in the past. When im using m version, i just cant seem to get the script to work. Im playing as opfor, and enabled the _mission_end_function , so in theory when all my teammates are dead, the map will end.

However when I start, it just goes - all teamates dead, finished etc.

It feels like I have simply put in the wrong values for friendly/enemy etc, but I cant figure it out.

here is the relevant part of the revive_intit.sqf

// UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED
_can_revive = "soldierEB"; //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 = "soldierEB"; //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 = 5; //array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units
_unit_medpacks = 2; //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 = "WEST"; //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 = "EAST"; //array no.42 - Friendly sides can be "EAST", "WEST","RESISTANCE" etc.
_allied_side_2 = ""; //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 = "";


Any ideas?

NeV3rKilL
Aug 3 2009, 16:17
The links are down :(

Starlight
Aug 3 2009, 17:13
Are you talking about this script or do you talk about something built ingame?
And if you know stuff, please do let us know how and what you are doing.


Ok well I will add this to help.

I have highlighted in Red the two factors relating to my previous post.
The first one is where if set to 0 "zero" you disable the respawn ability and just leave the revive ability.

The second set of highlights at the end show which bits need to be activated for the Mobile HQ that Norrin built into the script. It switches between a Vehicle HQ or a Tent deployed by the Leader.

Hope that helps

Read the PDF support document for further info



// ==================================================================
// RESPAWN OPTIONS
_no_respawn_points = 0; //array no.12 - no of respawn points (Max number 4)
_Base_1 = "Mobile HQ"; //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 = "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 otherwise s1 etc.
_mobile_man2 = objNull; //array no.71 - NOT IMPLEMENTED

NeV3rKilL
Aug 3 2009, 21:32
Do exist any manner to evit that, "I'm at grid XXXXXX" ??

shark-attack
Aug 7 2009, 18:30
gday mate

get this error since patch 103

http://img17.imageshack.us/img17/100/faultreport.jpg

Tophe
Aug 7 2009, 18:32
Would it be possible to set

_JIP_respawns = [2,30];
to

_JIP_respawns = param2;

If the mission is played with infinite I want the JiP players to get infinite respawns. I other words... I want the JiP to be set to the same as what the admin picked in the lobby.

Xeno
Aug 7 2009, 18:40
get this error since patch 103

http://img17.imageshack.us/img17/100/faultreport.jpg
You have to add the following to class Task in class NORRNRscMapControl in revive_sqf\dialogs\define.hpp file:



iconCreated = "#(argb,8,8,3)color(1,1,1,1)";
iconCanceled = "#(argb,8,8,3)color(0,0,1,1)";
iconDone = "#(argb,8,8,3)color(0,0,0,1)";
iconFailed = "#(argb,8,8,3)color(1,0,0,1)";
colorCreated[] = {1,1,1,1};
colorCanceled[] = {1,1,1,1};
colorDone[] = {1,1,1,1};
colorFailed[] = {1,1,1,1};
It should look like this then:



class Task {
icon = "\ca\ui\data\map_waypoint_ca.paa";
iconCreated = "#(argb,8,8,3)color(1,1,1,1)";
iconCanceled = "#(argb,8,8,3)color(0,0,1,1)";
iconDone = "#(argb,8,8,3)color(0,0,0,1)";
iconFailed = "#(argb,8,8,3)color(1,0,0,1)";
colorCreated[] = {1,1,1,1};
colorCanceled[] = {1,1,1,1};
colorDone[] = {1,1,1,1};
colorFailed[] = {1,1,1,1};
size = 20;
color[] = {0, 0.900000, 0, 1};
importance = "1.2 * 16 * 0.05";
coefMin = 0.900000;
coefMax = 4;
};


Actually that part is also missing in the artillery module in 1.03.

Xeno

norrin
Aug 7 2009, 23:18
Thought I'd give you guys a quick update on my current situation.

Got home from hospital just a couple of days ago following a date with a surgeon’s knife to remove a fist-sized lump from my abdomen. I am now the proud owner of an incision scar that extends from just below my belly button to a couple of centimetres above the wife's best friend. Thankfully the path results came back all clear so it looks like I’ll be a BIS fan boi for a good few years yet. However, I’m still not very mobile and I can’t sit at the computer for more than 5 minutes before it feels like my guts are going to spill out on the floor. They’ve also got me on some fairly heavy duty painkillers which are making it very difficult to concentrate and hence I’m not achieving much in the way of scripting at the moment but I’m hoping over the next week or so I’ll get back to normal.

I’d like to apologise to everyone that has asked questions over the last couple of weeks that I haven’t responded to, I’m still a little while off yet but I will eventually get back to you. I’d also like to pass on my heart felt thanks to Xeno, vengeance and Starlight for looking after the thread in my absence as well as those of you that have passed on their best wishes during what has been a fairly stressful time for me.

With a bit of luck in a week or so I’ll have an updated revive ready but in the mean time please see Xeno's fix in the previous post for version 1.03 compatability: http://forums.bistudio.com/showpost.php?p=1396970&postcount=145

Ghost
Aug 7 2009, 23:22
Rest up Norrin, Glad you are doing better. Look forward to your future work.

Kremator
Aug 8 2009, 00:26
Woah ... glad you are OK now norrin!

Get well soon mate !

ViperMaul
Aug 8 2009, 02:48
I concur Xeno. Nice fast response!

Mr Burns
Aug 8 2009, 02:55
Indeed, get well soon!

Tophe
Aug 8 2009, 05:49
Good to hear that everything has went well with you. Best wishes!

shark-attack
Aug 8 2009, 09:56
best wishes mate ... glad your ok !

vengeance1
Aug 8 2009, 19:21
WOW, good to hear your ok Norrin! Get Well Soon!

fleepee
Aug 8 2009, 20:39
Houlala! (very few people use that expression in France...)
I hope you'll get better as fast as possible, and... Carpe Diem! (very few people use that expression in France...)

I think we all can wait for the next versions of your very good scripts!!;)

Xtriaden
Aug 9 2009, 15:19
Hi, Thank you Norrin for this Script and I hope you are feeling better soon.

Only question I have atm is how do I make the Mission End if all players are dead and AI is out of heal kits or just to far away to save my poor ass?
Atm everything is working great, it just that I have to abort the game when we are all wipeout (not too much of a problem, but I am sure there is an easy answer).

vengeance1
Aug 9 2009, 15:28
Hi, Thank you Norrin for this Script and I hope you are feeling better soon.

Only question I have atm is how do I make the Mission End if all players are dead and AI is out of heal kits or just to far away to save my poor ass?
Atm everything is working great, it just that I have to abort the game when we are all wipeout (not too much of a problem, but I am sure there is an easy answer).

Have you tried using this Option in the Revive_init.sqf?

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

Explained on page 3 of the pdf.

shark-attack
Aug 9 2009, 15:48
hi mate

a problem since 103 patch .. i think ....


all tasks and notes are repeated in briefing after respawn ...

[GLT] Legislator
Aug 9 2009, 19:17
I'm featuering a strange error since patch 1.03.

http://img9.imageshack.us/img9/154/arma22009080920475606.th.jpg (http://img9.imageshack.us/i/arma22009080920475606.jpg/)


Warning Message: No entry 'mpmissions\__CUR_MP.Chernarus\description.ext/NORRNRscMapControl/Task.iconCreated'.
Warning Message: '/' is not a value
Warning Message: No entry 'mpmissions\__CUR_MP.Chernarus\description.ext/NORRNRscMapControl/Task.iconCanceled'.
Warning Message: '/' is not a value
Warning Message: No entry 'mpmissions\__CUR_MP.Chernarus\description.ext/NORRNRscMapControl/Task.iconDone'.
Warning Message: '/' is not a value
Warning Message: No entry 'mpmissions\__CUR_MP.Chernarus\description.ext/NORRNRscMapControl/Task.iconFailed'.
Warning Message: '/' is not a value
Warning Message: No entry 'mpmissions\__CUR_MP.Chernarus\description.ext/NORRNRscMapControl/Task.colorCreated'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'mpmissions\__CUR_MP.Chernarus\description.ext/NORRNRscMapControl/Task.colorCanceled'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'mpmissions\__CUR_MP.Chernarus\description.ext/NORRNRscMapControl/Task.colorDone'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Warning Message: No entry 'mpmissions\__CUR_MP.Chernarus\description.ext/NORRNRscMapControl/Task.colorFailed'.
Warning Message: Size: '/' not an array
Warning Message: Size: '/' not an array
Error in expression < _cam_hint0];

_target = _alive_friends select (lbCurSel 10005);
_follow_unit >
Error position: <select (lbCurSel 10005);
_follow_unit >
Error Nullteiler

*TCF*Jackal
Aug 9 2009, 19:23
Get well soon Norrin!

Xtriaden
Aug 9 2009, 19:40
Yes I have read the PDF and know about "_mission_end_function = 0; //array no.0 - mission ends when all players are unconscious" and this is quite nice.
But the problem with that is when I try and solo play a mission it will end the first time I get killed (as I am the only real player). What I am after is some way of telling if all the players are out of lives before I force the game to end. If I still have lifes left I can get AI to res me, but if I have no lifes left I want it to end.
The "_mission_end_function = 1" things only works when you have real friends :-)
I guess just knowing what Variable = lifes left will do me and I can the setup a trigger to end game if none of the players have any lifes left.

kylania
Aug 9 2009, 20:51
People getting the task error need to read this whole thread. Your answer is on page 15 (http://forums.bistudio.com/showpost.php?p=1396970&postcount=145). Fixed in (version 0.2O)!

Norrin, hope you're recovering well! Thanks again for this great resource!

norrin
Aug 9 2009, 21:51
@<hidden> - mate just check your revive_init.sqf and make sure NORRNCustomExec1 = ""; and NORRNCustomExec3 = ""; as I put some code in there in the test mission sometime before the latest patch so that the briefing was re-added when a player respawned.

@<hidden> and vengeance - :)

Thank you to everyone else for your best wishes - I'm already feeling much better and have started work on the next version, just want to fix a couple more bugs before I release.

[XDF]Banksy
Aug 10 2009, 05:37
Good to have you back on board buddy.

PataPalo
Aug 11 2009, 09:21
My arma2.rpt show that

Unit not created: Subgroup 2:456 not found
Cannot create object 2:249
Client: Remote object 2:249 not found
Creating debriefing
Client: Object 2:55 (type Type_96) not found.
Client: Object 2:55 (type Type_96) not found.
Client: Object 2:295 (type Type_144) not found.
Client: Object 2:423 (type Type_121) not found.
WARNING: Function 'name' - PataPalo is dead
WARNING: Function 'name' - Simon Lopez is dead
WARNING: Function 'name' - PataPalo is dead
Creating debriefing
Client: Object 2:295 (type Type_144) not found.
Client: Object 4:98 (type Type_121) not found.
Client: Object 4:89 (type Type_213) not found.
Client: Object 4:90 (type Type_213) not found.
Client: Object 4:91 (type Type_213) not found.
Client: Object 4:92 (type Type_213) not found.
Client: Object 4:93 (type Type_213) not found.
Client: Object 4:94 (type Type_213) not found.
Client: Object 4:95 (type Type_213) not found.
Client: Object 4:125 (type Type_121) not found.
Client: Object 4:100 (type Type_213) not found.
Client: Object 4:104 (type Type_121) not found.
Client: Object 4:112 (type Type_121) not found.
Client: Object 4:114 (type Type_121) not found.
Client: Object 4:122 (type Type_121) not found.
Error in expression <) select 0);
this setPos [(alpha_2 getVariable 'NORRN_pos_>
Error position: <setPos [(alpha_2 getVariable 'NORRN_pos_>
Error Tipo Cualquiera, esperado Número
Error in expression <) select 0);
this setPos [(alpha_3 getVariable 'NORRN_pos_>
Error position: <setPos [(alpha_3 getVariable 'NORRN_pos_>
Error Tipo Cualquiera, esperado Número
Error in expression <) select 0);
this setPos [(alpha_1 getVariable 'NORRN_pos_>
Error position: <setPos [(alpha_1 getVariable 'NORRN_pos_>
Error Tipo Cualquiera, esperado Número

It seems a revive issue, I only got DAC and revive for that mission and test it without DAC and same issue at arma2.rpt.

When IA dies sometimes respawn at respawn_west.

I´m one of your revive script fans...good work. :292:

vengeance1
Aug 11 2009, 13:04
WOW, I didn't know you could use DAC in ARMA2? You must have modified it a great deal?

What kind of Error Rpt do you get if you run the NORRIN Test Mission?

PataPalo
Aug 11 2009, 16:25
At dedicated server and revive test mission 0.2m I got that:

arma2.rpt

Remote entity want to supply: B 1-1-E:13 REMOTE
Remote entity want to supply: B 1-1-E:11 REMOTE
Remote entity want to supply: B 1-1-E:11 REMOTE
Remote entity want to supply: B 1-1-E:11 REMOTE
Creating debriefing
Client: Object 2:14 (type Type_96) not found.
Client: Object 2:73 (type Type_99) not found.
Client: Object 2:188 (type Type_144) not found.
Client: Object 3:26 (type Type_121) not found.
Cannot create object 2:201
Cannot create object 2:202
Client: Object 2:202 (type Type_82) not found.
Client: Object 2:201 (type Type_79) not found.
....
Unit not created: Subgroup 2:202 not found
Cannot create object 2:204
Client: Object 2:201 (type Type_79) not found.
Client: Object 2:176 (type Type_82) not found.
Unit not created: Subgroup 2:176 not found
Cannot create object 2:206
Unit not created: Subgroup 2:209 not found
Cannot create object 2:101
Client: Object 2:101 (type Type_86) not found.
...
Error in expression <unc_array') select 0);
this setPos [(s1 getVariable 'NORRN_pos_x'), >
Error position: <setPos [(s1 getVariable 'NORRN_pos_x'), >...
Error Tipo Cualquiera, esperado Número
Client: Object 2:101 (type Type_86) not found.
error - person has no brain
Client: Object (id 2:1, type Type_95) is local - update is ignored.
Client: Object (id 2:1, type Type_96) is local - update is ignored.
Creating debriefing
...

At arma2server.rpt

Server: Object 3:54 not found (message 121)
Server: Object 3:56 not found (message 121)
Server: Object 3:58 not found (message 121)
Server: Object 3:62 not found (message 121)
Server: Object 3:60 not found (message 121)
Server: Update of object 2:99 arrived from nonowner
Server: Object 3:65 not found (message 121)
Server: Object 3:64 not found (message 121)
...

I got no custom addons.

Thanks all for fast reply. :bounce3:

norrin
Aug 11 2009, 23:52
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

@<hidden> - Very hard to know what the problem is without seeing your mission mate but no probs at all with getVariable 'NORRN_pos_x' in my testing so it may be revive_init config error.

vengeance1
Aug 12 2009, 14:01
Thanks NORRIN, great to see this so soon. Hope all is well with the recovery!

:yay:

shark-attack
Aug 12 2009, 17:21
nice one mate ...

gonza
Aug 13 2009, 17:34
yes thanks Norrin

PataPalo
Aug 14 2009, 21:09
Thank you very much Norrin. :bounce3:

shark-attack
Aug 16 2009, 13:54
gday mate

been playing with the specials in revive set up :)
an excellent addition ... respawn in vehicles is sweet

im wondering if it would be possible to present the player with a choice of insertion methods (land sea or air) after the briefing on loadup ... similar to the jip/ respawn options ... or would a seperate dialog be required


would be an awsome addition to an already amazing script

best wishes mate

shark attack

[GLT] Legislator
Aug 17 2009, 09:56
Norrin,

I noticed something strange with my teammate and I think you should know this. Maybe you'll already know. In the revive script the mission editor has to name the playable units. So far, so good.

But undeclared global variables will cause errors in the server.rpt! That's the case if - let's say there're 20 player lots / playable units - and only 3 players ingame.

JIP units will be initialized when they join. Preplaced units will be empty until then (nil).

I hope this helps you in some way. Right now the only solution is to fill up every player slot so no playable-unitname is seen as an undeclared variable.


Edit:
I might have a feature request :D It would be nice if mission editors could set up the cargo of the mobile respawn ammo box in the revive_init.sqf. Sometimes it's good to have at least 3 anti tank grenades at the frontline.

norrin
Aug 18 2009, 00:35
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_03.utes.rar If you are using revive 0.2C+ just copy the new revive_sqf and respawn_special to your mission directory

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.

@<hidden> - if an unconscious player/AI unit is in your group a green diamond will now show where the unit's body is in game so hopefully finding the downed unit will be a bit easier.

@<hidden> - I'm not sure it will be problem mate as I introduced some changes in the previous version so that in AI disabled missions, only the player runs an instance of the scripts for himself - also any code that checks the playable units array also has an !isNull unit check (though I may have missed something).


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

vengeance1
Aug 18 2009, 01:14
Much appreciated as always I will load it up into my missions.

"please only use if you are willing to put up with any bugs the changes have introduced"

Bugs? We'll Shoot`em!

:uzi: :slayer3:

Dr_Eyeball
Aug 18 2009, 01:29
Any chance of making it work on the LHD too? I made 50% of the changes required to make this work (in old version), but can't find where it sets the position for some of the remaining states.

Does this support revive for 2 teams? i.e. both BluFor and OpFor.

norrin
Aug 18 2009, 03:10
Thanks Vengeance :)

@<hidden> - the current version allows respawning on the LHD if thats what you're after - also its a fairly simple matter to make it work with 2 teams - just need to have a revive_init_west and revive_init_east and some code in the init.sqf so that depending on the players side it runs the correct revive_init.sqf. I can send you an example if you like just PM your email address mate.

King Nothing
Aug 18 2009, 13:42
I've tried but couldn't get it work so far. Is it possible to disable the respawn completely so that you can only be revived for 5 times after which you die and mission will end unless all team members get unconcious which will also lead to failure? How the revive_init.sqf should be modified to get it right?

[GLT] Legislator
Aug 18 2009, 14:25
Note: will update first post in thread if I get feed back suggesting that all's OK.

We'll have a coop evening today. I'll update the revive script for my missions (I'm glad that's my already planned work :)) so I can give you a feedback the next morning.

R34P3R
Aug 18 2009, 19:16
is there a way to disable thze dialog ?

norrin
Aug 18 2009, 21:31
Here's the revive_init.sqf options for a basic set-up for six players (s1,s2,s3,s4,s5,s6). Five minute revive time limit (300 seconds) then the player dies outright and mission ends when all players are unconscious, no respawn points, no welcome screen.

/*
ARMA2 REVIVE SCRIPT - AI enabled or disabled

© AUGUST 2009 - norrin (norrin@<hidden>)

Version: 0.3 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 = 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"];
// ==================================================================
// WELCOME SCREEN
//
// ==================================================================
// REVIVE OPTIONS
_max_respawns = param2; //array no.38 - Number of lives per unit
_JIP_respawns = [0,0]; //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 = [0, [""]]; //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 = 0; //array no.12 - no of respawn points (Max number 4)
_Base_1 = ""; //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 = 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 = 3; //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 = 0; //array no.51 - set to 1 if you want to use mobile spawn
_mobile_base_start = "objNull"; //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 = 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 = ""; //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 = 0; //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 = 0; //array no.82 - Make units bleed and require bandages
_medic_medpacks = 5; //array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units
_unit_medpacks = 5; //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 = 5; //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 = 0; //array no.1 - whether a respawn dialog appears when all players are unconscious (_all_dead_player = 1)
_respawn_button_timer = 10000; //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 = 10000; //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 = 0; //array no.96 - specify whether a unit receives bonus lives for reviving other players
_revives_required = 0; //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 = 0; //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 = 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 = 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 = 0; //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];

// start related revive functions
[] execVM "revive_sqf\init_related_scripts.sqf";

if (true) exitWith {};
//Last edited 18/08/09

[GLT] Legislator
Aug 19 2009, 07:43
Sorry norrin :( Couldn't do any tests with revive 0.3 beta yesterday. There was an error message (I didn't write it down). Seemed like a file was missing inside the revive folder. I simply deleted the old folders and inserted the new ones. I'll have a closer look into it today.

norrin
Aug 19 2009, 11:40
Revive 0.3b beta update

Download
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03b.utes.rar just replace the revive_sqf folder in your mission file with the one in the download.

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

@<hidden> - mate I've converted and tested 3 missions so far by swapping the revive_sqf folder and haven't come across any missing file errors, so please let me now if it keeps happening.

vengeance1
Aug 19 2009, 13:14
NORRIN

I tested .03 in Sharks EOD Mission converted to AI Enabled Mode (Thanks Shark adding a Gnat Sub Insertion and Chinook CRRC Drop;)) for hours last night, worked great except for respawning in the middle of the ocean when I selected Mobile Respawn Point. Can't remember if I rejoined but looks like you addressed that in .03b. I need to do more JIP testing.

I had no issues with missing files. I converted 3 missions, EOD, Russian Occupation, Special Forces Neptune.

I will try this one in same mission today or tomorrow.

Thanks

shark-attack
Aug 19 2009, 16:55
gday mate ..

forgive my ignorance .. but

is it possible to present the jip/respawn dialog to the player on mission start
without starting the unit in an unconcious state ...


@<hidden> vengeance
anytime mate feel free to alter at will ... :)
(be real nice to join you sometime see how it plays)

[GLT] Legislator
Aug 19 2009, 18:13
I managed to get Revive 0.3b working, but at one point something went wrong. I had a group of 20 AI soldiers using the revive script. I played a mission on the dedicated server. The enemy decided to crash a Mi-8 into my group. Almost everybody got killed except for 4 units. I think the units got kicked out of the revive script. They weren't in my group anymore and near none of the respawn markers. I don't know if they spawned at respawn_west or not, but I guess so. I don't know why but somehow there is are problem with explosions and the revive script for ages now :(

There were no errors in the RPT file reported. A few seconds after that incident my ArmA II crashed relating to a fault adress in the d3d9.dll, but I think it's not related to the script. Somehow the system was overwhelmed by something.

vengeance1
Aug 19 2009, 22:02
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.

norrin
Aug 20 2009, 01:49
@<hidden> - I've only every tried killing 4 units in a Hummer in a single explosion with the latest versions (never had any probs) but I'll try blowing up a truck full of units and see if I can trigger the bug.

@<hidden> - thanks for that info - there is a possibility that if I remove all the dead units weapons first they delete fine (need to test this further) so I may have to modify the code if its not fixed in the next patch.

@<hidden> -Yep just set in the revive_init.sqf
_JIP_spawn_dialog = 1;
_time_b4_JIP_spawn_dialog = 300;
Where the 300 is the time in seconds after the mission starts that you want the JIP dialog to start appearing for joining players.

Revive 0.3b beta
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03b.utes.rar

gnarly_rider
Aug 20 2009, 05:04
Gents, I'm trying to set the _revive_damage variable such that upon revive, a player is functional but badly wounded (e.g. can only crawl, and needs medic to heal).

Setting this to 0.9 results in wavering gunsights and visible blood, but player can still run. Setting 0.99, 0.95 etc simply results in player dying again straight after being revived. Anyone know a magic number to achieve what I'm after, or some other way of doing so?

Basically when a player goes down, I want anyone to be able to revive them, so they will be able to see, and shoot very poorly but cannot move much at all, and perhaps crawl or walk at best. Only medic can heal them fully... Player is sort of functional, but very vulnerable and still a liability

kylania
Aug 20 2009, 06:44
gnarly, from my experience (reviving with 0.7 damage and only medics can heal) it was a horrible experience. On paper having medics be important is a great idea, but gameplay wise everything took forever and was a pain. :)

norrin
Aug 20 2009, 11:53
Basically when a player goes down, I want anyone to be able to revive them, so they will be able to see, and shoot very poorly but cannot move much at all, and perhaps crawl or walk at best. Only medic can heal them fully... Player is sort of functional, but very vulnerable and still a liability

Hi mate,

Here's a script by Hulking Unicorn for the old ArmA revive that I've just updated for ArmA2 that stops revived players from kneeling and standing until they are fully healed by a medic: http://norrin.org/downloads/ArmA2/revive/AI_enabled/fix/rPrn.rar

To use
* You'll need to copy the rPrn.sqf into your mission folder.
In the revive_init.sqf:
* set the revive_damage to at least 0.7 eg.
_revive_damage = 0.7;
* in NORRNCustomExec1 put

NORRNCustomExec1 ="if (_name == player) then {[_name] execVM 'rPrn.sqf'}";

@<hidden> - I've just tried blowing up a truck containing 10 playable AI and another player (all revivable) without problems, all the units fell unconscious and remained in my group and could be revived/dragged etc

Revive 0.3b
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03b.utes.rar

[GLT] Legislator
Aug 20 2009, 12:45
Very strange ... maybe you should recreate the way it happened in my mission. The soldiers were on an open field near Pogorevka. The Mi-8 crashed directly into the group. So maybe the problems differ in a way if people are inside vehicles or outside of vehicles. Or maybe the type of the explosion shell triggers the problem. I simply don't know :( It could also be a total randomized error. I'll a look into it in the future.

norrin
Aug 24 2009, 01:07
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

vengeance1
Aug 24 2009, 02:43
Thanks NORRIN,

I'll give this update a try with Shark's mission (thanks Shark hope you don't mind, also improved the Chinook Drop a lot).

QUESTION: I is possible to have some of your AI team respawn as normal in AI-Enabled but NOT Playable when part of your group? Example: I have say three AI in the group NON-Playable and 3 AI Playable.

Thanks

norrin
Aug 24 2009, 02:53
So you want revivable non playable AI units? Its possible mate but there would be a lot of new code involved so its a bit outside my present goal, which is to get the current version bug free - sorry mate.

Revive Beta Version 0.3C: http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03c.utes.rar

vengeance1
Aug 24 2009, 13:27
So you want revivable non playable AI units? Its possible mate but there would be a lot of new code involved so its a bit outside my present goal, which is to get the current version bug free - sorry mate.

Revive Beta Version 0.3C: http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03c.utes.rar

No big deal, always looking for new features.

I tested last night new version but got killed in water while in boat in EOD mission, could not Wash Ashore, had button but never happened, could not respawn, had to Abort. Could be my mission I will test again tonight to confirm.

tcp
Aug 28 2009, 16:55
Why do I get "Player is dead. Please press escape, return to the unit selection menu and choose another playable unit"?

norrin
Aug 28 2009, 22:00
Why do I get "Player is dead. Please press escape, return to the unit selection menu and choose another playable unit"?

Hi mate,

Is it possible that you have the respawn_west marker placed where you units start on the map? If it is move it right out of the combat area.

norrin

tcp
Aug 31 2009, 02:34
no the markers are placed outside the regular map. I have only base defined as a respawn. Sometimes its work, but when its a headshot or serious wound it doesn't let you select respawn at base.

norrin
Aug 31 2009, 02:40
no the markers are placed outside the regular map. I have only base defined as a respawn. Sometimes its work, but when its a headshot or serious wound it doesn't let you select respawn at base.

Mate email me your mission here (norrin@<hidden>) and I'll take a look. Are you using a beta version of ArmA2?

vengeance1
Sep 3 2009, 01:41
NORRIN,

Have you seen any issues with Water Crash while in A10? I was shot down and landed in a small lake. Heard water when dead, no view (black) but got respawn dialog buttons. Selected Airport and respawned swimming in the ground.

Vengeance

norrin
Sep 3 2009, 03:18
Just trying to replicate that bug by crashing an A10 into the dam on Chenaurus and can't.

There is a problem with the lakes and dams though as they are not recognised by the surfaceIsWater command so the anti-water code doesn't work if you die in one, so unless you've got respawn at base markers you'll end up stuck unconscious on the bottom of the dam - will look into it but would recommend you don't die in the dam for the time being.

AF-Killer
Sep 4 2009, 00:58
@<hidden>
Great script mate, finally got it working with mobile respawn in a mission I am making.

I have played around with setting options in the revive.init.sqf and can see for the most part what does what.

What I am trying to do is have it so that, if injured (unconscious) you must have another player come to your aid, and give basic first aid, (stop the bleeding etc, which revives you but with limited functionality, but you must be moved back to the mobile respawn for full recovery. Either dragged/carried or moved into a cargo and driven there.

Is this possible within the scope of your current scripts?

EDIT:
OK I think I found what it is I am after.

_caseVAC - Allows units to be taken to a hospital etc to be revived, needs to be an array eg.
[0] 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. If the object is a vehicle you will need to load the unconscious unit on the vehicle in
order to revive him.

Can you please explain the easiest way to set this up?
I assume it needs a unit/s (vehicle/s) designated as "MASH" with associated markers.

If you could just elaborate a little more, I'd appreciate it

Thanks mate

norrin
Sep 4 2009, 02:16
Hi mate,

The CASEVAC works like a unit that is designated as a reviver in the revive_init.sqf except it does it pretty much automatically - so I'm not sure its exactly what you want.

There is a way you can do what you're after however:
You could use the bleeding function in the scripts so you'd still need the bandages but then not designate any unit types in the can_revive lines in the revive_init.sqf. Instead you'd put MASH in the CASEVAC parameter.

That way the medics would be able to heal damage and other units could bandage each other and themselves if they were bleeding, however when you fell unconscious you'd need to be extracted to a MASH tent to be revived.

I hope this makes sense,

norrin

AF-Killer
Sep 4 2009, 02:48
That way the medics would be able to heal damage and other units could bandage each other and themselves if they were bleeding, however when you fell unconscious you'd need to be extracted to a MASH tent to be revived.

With regards the MASH tent, does it need to be a Mash tent or can it ba a vehicle? If so is it a simple case of naming the vehicle "MASH"?

With regards dragging and carrying, that option is only available if they are unconscious? I am thinking of AI here, as when I test (shoot them) they seem to just die. Maybe I need to make sure they are in an array somewhere.

Thanks

norrin
Sep 4 2009, 03:01
For the CASEVAC it can be any number of things. For instance:
_caseVAC = [1, ["MASH","HMMWV_Base"]]; in the revive_init.sqf specifies that both MASH tents and HMMWV can be used as CASEVAC points. Note for the latest versions of the scripts you need to drag the unconscious unit and load it into a stationary CASEVAC vehicle in order to revive it.

Currently the scripts only work for human players and playable AI units, not unplayable AI units. This may change down the track but thats the way it is for the time being.


Revive 0.3C: http://www.norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03c.utes.rar

Tophe
Sep 4 2009, 23:36
Hello...
I added the 0.3c script to EVO 3.6.
I've been getting a lot of problems with the weapons after revive or respawn. Sometimes you get an old loadout, or you loose everyting but the M9.

This might be a script conflict, nut I'm not sure. I tried setting _respawn_at_base_addWeapons to 1 and 0... But that doesn't help.

Any ideas?


EDIT
I'm not sure but there seems to be a script that takes care of the weapons in EVO. Is there a way to disable the remove and add weapons procedure in the revive script?

norrin
Sep 5 2009, 23:31
@<hidden> - don't know much about EVO mate as I'm not sure I've ever played it to be honest. Its certainly possible to remove the weapon code in the revive scripts but I'm guessing its going to be a hell of a lot easier to remove it from the standard EVO ie. just stop a script from running rather than changing existing scripts. If you can email me your EVO to here (norrin@<hidden>) I'll take a quick look.

Le_CuLtO
Sep 6 2009, 09:14
Thanks for your script ! I used it for a pvp mission (0.3C), didn't made a lot of tests but it seems to work :yay:

I made a pvp demo mission for interessed people (didn't tried with mobile respawn)
http://www.2shared.com/file/7608749/e55da17e/test_revive_pvpChernarus.html

gnarly_rider
Sep 8 2009, 03:04
Hi mate,

Here's a script by Hulking Unicorn for the old ArmA revive that I've just updated for ArmA2 that stops revived players from kneeling and standing until they are fully healed by a medic: http://norrin.org/downloads/ArmA2/revive/AI_enabled/fix/rPrn.rar

To use
* You'll need to copy the rPrn.sqf into your mission folder.
In the revive_init.sqf:
* set the revive_damage to at least 0.7 eg.
_revive_damage = 0.7;
* in NORRNCustomExec1 put

NORRNCustomExec1 ="if (_name == player) then {[_name] execVM 'rPrn.sqf'}";

@<hidden> - I've just tried blowing up a truck containing 10 playable AI and another player (all revivable) without problems, all the units fell unconscious and remained in my group and could be revived/dragged etc

Revive 0.3b
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03b.utes.rar

Awesome, will give it a go Norrin!

[GLT] Legislator
Sep 8 2009, 08:51
Heyho norrin,

no problems found so far :) When do you plan the next huge revive update? *hoping for customizable mobile respawn ammo crates* :p

norrin
Sep 9 2009, 00:00
@<hidden> Legis - I'll add it to the list mate. :)

I'm away and offline now until the 26th September - but if there's no major bug reports I'll start adding the new features then. Off the top of my head I can't remember whats on the list but I do remember it being pretty long.

The plan is that in future we'll have a stable release version (based off 0.3c) that contains the current feature set so that mission makers have something that works to use in their missions and also a new beta that contains the new features for people who want to try or need the new features.

Revive 0.3c
http://norrin.org/downloads/ArmA2/revive/AI_enabled/Revive_TEST_03c.utes.rar

[GLT] Legislator
Sep 9 2009, 05:44
Heyo,

you should try out Instant Mantis (http://www.orbitfiles.com/download/id2661702981.html). This way it's very easy to remember every task even after weeks :p

Have much fun in your vacation (?). Anyway, you deserve some spare time! :)

PataPalo
Sep 9 2009, 19:29
Hi Norrin, with revive 0.3c it seems when unit is unconscious enemy still fire him.

Another issue is when IA enable and into your group, they loose group after they go inside a vehicle...not sure when.

For all other it goes nice, good work.:803:

Tophe
Sep 9 2009, 19:34
@<hidden> - don't know much about EVO mate as I'm not sure I've ever played it to be honest. Its certainly possible to remove the weapon code in the revive scripts but I'm guessing its going to be a hell of a lot easier to remove it from the standard EVO ie. just stop a script from running rather than changing existing scripts. If you can email me your EVO to here (norrin@<hidden>) I'll take a quick look.


Thank you Norrin.... I solved it.
I just disabled the weapon handling in Evo, it works fine!
Thanks for your time..

[GLT] Legislator
Sep 10 2009, 09:09
Norrin, one of my clan member found something interesting which you should know. Maybe you already know it :p

If the player dies under the following conditions, the killed eventhandler is triggered twice:
- if the player kills himself via ESC / respawn
- if the player is killed by environment actions (explosions, falling from high buildings)

He found a solution. Simply add a global variable inside the "killed scriptcode". In the same script create a query and check if this variable is set or not; if yes then exit the script or code. Then you'll need to reset the variable. This should fix the bug and should kill the bug kicking the player out of the revive script after dying in an explosion.

I'm just reciting him. He doesn't know if this bug is happening only to human or to AI too.

camus25555
Sep 11 2009, 11:39
i'm trying to use UMSC special force but it doesn't work very well

i tried several setup:

can_revive = "FR_Base"; //array no.18
_can_revive_2 = ""; //array no.19

_can_be_revived = "FR_Base"; //array no.20
_can_be_revived_2 = ""; //array no.21

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

or

can_revive = "SoldierWB"; //array no.18
_can_revive_2 = "FR_Base"; //array no.19

_can_be_revived = "SoldierWB"; //array no.20
_can_be_revived_2 = "FR_Base"; //array no.21
= ""; //array no.75 - NOT IMPLEMENTED
_medic_1 = "FR_Corpsman"; //array no.76 - Used in conjunction with medpacks and bleeding
_medic_2 = "USMC_Soldier_Medic";

still having some curious problem, assaut recon can revive but heavy gunner cannot :confused:

what is the right setup?

kylania
Sep 11 2009, 13:00
Force Recon guys can be revived by default. Don't have to change from SoldierWB to get them working.

vengeance1
Sep 16 2009, 12:53
NORRIN,

I have been using Revive now in Domination and Evo for awhile working quite well. With 1.04 however I did discover it is not recognizing Mobile Respawn Point (Player) and if you select Mobile it goes to LHD. Also Mobile Marker does not show up.

Not sure if anyone else has seen this or if it could be another AddOn conflict.

Good News: In 1.04 I have mixed Non-Playable AI with Playable AI and the Non-Playable do come to revive you, very cool. Also had Recruits on my squad (of course they did not respond).

MCPXXL
Sep 16 2009, 13:47
I had it also , but the thing is that is goes well while starting local mpmission ...

On dedicated it happends like you described

[GLT] Legislator
Sep 17 2009, 20:18
With 1.04 however I did discover it is not recognizing Mobile Respawn Point (Player) and if you select Mobile it goes to LHD. Also Mobile Marker does not show up.


I copy that! The mobile respawn marker doesn't show up at all and the marker itself isn't moved anymore with 1.04. :(

King Nothing
Sep 17 2009, 21:10
Hi, in my mission the revive count is defined by param2. When I choose no revival (param2 = 2000) and start mission it says that all players are dead and mission ends though 1 player is alive, I tested it by playing alone. However when I set revive on it works alright. What's wrong?

Here's the revive_init.sqf

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 = 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 = ["p1","p2","p3","p4","p5","p6","p7","p8","p9","p10","p11","p12"];
// ==================================================================
// WELCOME SCREEN
//
// ==================================================================
// REVIVE OPTIONS
_max_respawns = param2; //array no.38 - Number of lives per unit
_JIP_respawns = [0,0]; //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 = [0, [""]]; //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 = 0; //array no.12 - no of respawn points (Max number 4)
_Base_1 = ""; //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 = 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 = 3; //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 = 0; //array no.51 - set to 1 if you want to use mobile spawn
_mobile_base_start = "objNull"; //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 = 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 = "FR_Corpsman"; //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 = 0; //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 = 0; //array no.82 - Make units bleed and require bandages
_medic_medpacks = 5; //array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units
_unit_medpacks = 5; //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 = 5; //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 = 0; //array no.1 - whether a respawn dialog appears when all players are unconscious (_all_dead_player = 1)
_respawn_button_timer = 10000; //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 = 10000; //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 = 0; //array no.96 - specify whether a unit receives bonus lives for reviving other players
_revives_required = 0; //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 = 0; //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 = 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 = 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 = 0; //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];

// start related revive functions
[] execVM "revive_sqf\init_related_scripts.sqf";

if (true) exitWith {};
//Last edited 18/08/09

kylania
Sep 17 2009, 21:17
King Nothing, make sure that "respawn_west" and "Boot_Hill" markers are well far away from the starting location. The "starting dead" usually means you're within 200m of the "repsawn_west" marker.

"Base" marker should generally be where you start and where you want to respawn.

King Nothing
Sep 17 2009, 22:33
King Nothing, make sure that "respawn_west" and "Boot_Hill" markers are well far away from the starting location. The "starting dead" usually means you're within 200m of the "repsawn_west" marker.

"Base" marker should generally be where you start and where you want to respawn.

Nope, that wasn't it, both markers are far away. Tried moving them to different places to be sure, still the same problem. But thanks for replying. It does work when I set the revive on so I've got 2 or 4 or 6 revives and so on. But when I turn it off by setting it to 2000 the starting dead thing comes in. What could it be?

kylania
Sep 17 2009, 23:19
So you don't want to use revive at all? Seems an odd option really, if you're gonna turn it off might as well remove the scripts. :) I've never actually played like that, so not sure exactly. :(

King Nothing
Sep 17 2009, 23:45
So you don't want to use revive at all? Seems an odd option really, if you're gonna turn it off might as well remove the scripts. :) I've never actually played like that, so not sure exactly. :(

Actually it's just an option in case the players like to play the mission the extreme way as it's a long mission. And I believe not everyone likes to have a revival ability so I'd like to have it as one option, then the options please everyone. :)

[GLT] Legislator
Sep 18 2009, 05:47
Hi, in my mission the revive count is defined by param2. When I choose no revival (param2 = 2000)

Aside from your issues make sure to give param2 a value in the init.sqf or you'll have errors in the RPT file.


if (isnil "param2") then
{
param2=2000;
};


This way param2 gets a value before the game recognizes it has no value yet (maybe because of long waiting times). I did several tests in the past months to prove that. In ArmA II every single variable needs to be defined or at least given a value.

Woodstock21
Sep 20 2009, 03:29
Hello everyone, So im pretty new to the whole map making thing. I got a bunch of scripts to work and stuff. and slowly figuering things out on my own and with some tutorials and research that i've done. Now i don't know if i just missed reading somewhere that this can't be done or not. but i will ask anyways

So i have a map it has 7 USMC guys init with the revive script working just fine, But i also have a playable Guerila Warlord in the map to play along side the USMC (kinda like a local tour guide but playable). With all the tests i've done solo with AI guys, if im the USMC and i shoot the warlord i cannot revive him and same with vice versa. for my revive_init.sqf i have: i also tried GUE_warlord in lieu of soldierGB. Any help would be wonderful. thanks in advance.

/ UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED
_can_revive = "soldierWB","soldierGB"; //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","soldierGB"; //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

AF-Killer
Sep 20 2009, 07:55
@<hidden> Woodstock
Dont forget to add the name of the warlord unit to the array in the revive_init.sqf

looks like this (around line 53)...add all the units names that you wish to be able to revive and be revivable

// LIST OF PLAYABLE UNITS
NORRN_player_units = ["UnitUSMC_1Plt_PltCo","UnitUSMC_1Plt_PltSgt","UnitUSMC_1Plt_PltM",...etc etc ..;]

norrin
Sep 20 2009, 08:50
@<hidden> - you need to change the revive_init.sqf to look like this:

// UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED
_can_revive = "soldierWB"; //array no.18
_can_revive_2 = "soldierGB"; //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 = "soldierGB"; //array no.21
_can_be_revived_3 = ""; //array no.74 - NOT IMPLEMENTED
_can_be_revived_4 = ""; //array no.75 - NOT IMPLEMENTED

@<hidden> else - with the help of MCPXXL I'm trying to track down the cause of the mobile spawn marker bug in version 1.04 - no luck so far but we are working on it. I also need to change some code for the AI smoke grenades seeing that they've fixed the smoke grenade bug in the latest patch.

MattXR
Sep 20 2009, 11:36
did you know the F2 framework has a working 1.03 Kegetys Spectate Script for Arma2 if your interested. Im about to use your revive in a new mission of mine so im gona check everything out that you have! Good Work btw!! :P

norrin
Sep 20 2009, 11:42
did you know the F2 framework has a working 1.03 Kegetys Spectate Script for Arma2 if your interested. Im about to use your revive in a new mission of mine so im gona check everything out that you have! Good Work btw!! :P

Yep mate I did - I'm a member of F2 and I gave ViperMaul a little bit of help in converting Kegs work for ArmA2 - I'll think about adding it to the revive script but I'm not sure I want to give dead players too much info concerning whats going on in the field when they are spectating team mates.

vengeance1
Sep 20 2009, 14:15
[QUOTE=norrin;1443443
@<hidden> else - with the help of MCPXXL I'm trying to track down the cause of the mobile spawn marker bug in version 1.04 - no luck so far but we are working on it. I also need to change some code for the AI smoke grenades seeing that they've fixed the smoke grenade bug in the latest patch.[/QUOTE]

NORRIN,

Just a note I changed my Mobile to Vehicle and it works for me in my missions anyway which are EVO and Domination.

Atsche
Sep 20 2009, 14:47
It hast something todo with the boothill, respawn and center markers. For example when i put them to far away from startpoint, mobile doesent work. If i put all markes enough close togheter then everything is working fine. But this is realy only since a21.04.

MattXR
Sep 20 2009, 15:12
Your spectate is just fine anyways, forget what i said :P

Anyways if you wish norrin i changed a few things for my mission to use the new params with version 1.04

Description.ext
///////////////////////////////////////////////////////////////////////////////////////////
class Params
{
class DayTime
{
//paramsArray[0]
title = "Time";
values[] = {-6, 0, 8, 13};
texts[] = {"Morning", "Day", "Sundown", "Night"};
default = 0;
};
class Revive
{
// paramsArray[1]
title = "Number of Revives:";
values[] = {2000,1000,20,10,7,5};
texts[] = {"No Revive","Infinite - Cadet","20 - Easy ","10 - Normal","7 - Hard","5 - Extreme"};
default = 5;
};
class Grass
{
// paramsArray[2]
title = "Weather Options";
values[] = {0, 0.3, 0.7, 1};
texts[] = {"Sunny", "Light Overcast", "Heavy Overcast", "Stormy"};
default = 0.3;
};
};

Init.sqf

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

skiptime (paramsArray select 0);
0 setovercast (paramsArray select 2);



(change the old one with this new one:
revive_init.sqf

_max_respawns = (paramsArray select 1); //array no.38 - Number of lives per unit

Woodstock21
Sep 20 2009, 18:25
So i changed the init there to add the soilderGB on the secon line, and when i sample the game it now shows that he has 7 lives left, which is great, but the issue i have is that he is the only guerilla Unit on the map all the rest are USMC, and when i choose to use the Warlord, and go off and shot one of the USMC teammates i don't have the option to heal or revive him, and if i use the USMC and shot the warlord same thing no heal or revive option. Is that even possible? i also added RESISTANCE to the FRIENDLY SIDE TO PLAYABLE UNITS. Any and all help is appreciated. and clearly im a nub when it come to this stuff. typically its just all trail and error, untill i get to the point of OMFG i dunno what to do. =)

Below is all the changes that i've done to the revive_init.sqf. and still no luck.


/ LIST OF PLAYABLE UNITS
NORRN_player_units = ["s1","s2","s3","s4","s5","s6","s7","s8"]; //warlord is s8

/ UNITS THAT CAN REVIVE/UNITS THAT CAN BE REVIVED
_can_revive = "soldierWB"; //array no.18
_can_revive_2 = "soldierGB"; //array no.19
_can_revive_3 = ""; //array no.72
_can_revive_4 = ""; //array no.73
_can_be_revived = "soldierWB"; //array no.20
_can_be_revived_2 = "soldierGB"; //array no.21

/ FRIENDLY SIDE TO PLAYABLE UNITS
_allied_side_1 = "WEST","RESISTANCE"; //array no.42 - Friendly sides can be "EAST", "WEST","RESISTANCE" etc.
_allied_side_2 = "WEST","RESISTANCE"; //array no.43 - If all players are from the same side make sure you set the same side for both

norrin
Sep 22 2009, 03:33
I've been looking into the mobile player respawn problem in v1.04 and as far as I can tell its related to the SLX_ragdoll.pbo. I've looked through this addon and I can't find a reason why this would be conflicting with the revive scripts so can the people who had this problem please let me know if they are using this addon?

Thanks,

norrin

UPDATE:
I think the latest ragdoll addon (v2: http://www.armaholic.com/page.php?id=7501 ) may be OK and is compatible with the revive scripts. Can someone please confirm this?

[GLT] Legislator
Sep 22 2009, 06:24
I don't think the mobile respawn bug is related to the ragdoll addon. I didn't use it on the client and server, but had those problems mentioned some posts earlier.

norrin
Sep 22 2009, 07:38
All I can say mate is I don't have the bug on a dedicated server in my own missions that don't use addons and in a version of EVO sent to me, which had the bug and used SLX as well as a lot of other addons, removing the ragdoll.pbo fixed the player mobile respawn bug.

What addons were you using?

[GLT] Legislator
Sep 22 2009, 10:19
I'm using at least no public addons within the mission, only some sound and voice mods and a clanintern script package addon module. But this shouldn't be a problem in theory as it's using own variables. Before 1.04 it was definately compatible to your revive script. I'll send you the mission + the module addon this evening. Maybe you can figure something out.

Tophe
Sep 23 2009, 04:34
Hey... I've been getting some really weird problems in a mission (it's a render of the evo mission). When somebody dies you get two or three Revive, Drag Body and Carry Body in the menu. Also the actions will stay in the revivers list even after reviving the unit, until he has died himself.

Every time you revive a unit another Revive, Drag, Drop action will be added to the action menu leaving you with loads of actions after a while.
The player with all the actions is somehow tied to the unit it revived... If I choose one of the drag body actions the unit I earlier revived will teleport to my location and freeze as a body being dragged.

Any ideas what this problem might be?

PeterEyres
Sep 23 2009, 22:53
Here's the revive_init.sqf options for a basic set-up for six players (s1,s2,s3,s4,s5,s6). Five minute revive time limit (300 seconds) then the player dies outright and mission ends when all players are unconscious, no respawn points, no welcome screen.

/*
ARMA2 REVIVE SCRIPT - AI enabled or disabled

© AUGUST 2009 - norrin (norrin@<hidden>)

Version: 0.3 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 = 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"];
// ==================================================================
// WELCOME SCREEN
//
// ==================================================================
// REVIVE OPTIONS
_max_respawns = param2; //array no.38 - Number of lives per unit
_JIP_respawns = [0,0]; //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 = [0, [""]]; //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 = 0; //array no.12 - no of respawn points (Max number 4)
_Base_1 = ""; //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 = 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 = 3; //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 = 0; //array no.51 - set to 1 if you want to use mobile spawn
_mobile_base_start = "objNull"; //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 = 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 = ""; //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 = 0; //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 = 0; //array no.82 - Make units bleed and require bandages
_medic_medpacks = 5; //array no.83 - No of medpacks for units specified in the _medic variables - they are required for reviving units
_unit_medpacks = 5; //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 = 5; //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 = 0; //array no.1 - whether a respawn dialog appears when all players are unconscious (_all_dead_player = 1)
_respawn_button_timer = 10000; //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 = 10000; //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 = 0; //array no.96 - specify whether a unit receives bonus lives for reviving other players
_revives_required = 0; //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 = 0; //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 = 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 = 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 = 0; //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];

// start related revive functions
[] execVM "revive_sqf\init_related_scripts.sqf";

if (true) exitWith {};
//Last edited 18/08/09


I'm using this as a template for my mission. I have only changed the players names...s1,s2 to accomodate up to 10 players.

Most of the time, people are able to revive. I dont want any respawns. The game will end when everyone is unconcious, but occasionally when a player dies they simply respawn straight away at the Respawn_West marker (which i have placed miles away from boot_hill or the combat) (does this have to be in, if I dont want respawns?)

Why is this happening?

Cheers

norrin
Sep 23 2009, 23:15
I'm using this as a template for my mission. I have only changed the players names...s1,s2 to accomodate up to 10 players.

Most of the time, people are able to revive. I dont want any respawns. The game will end when everyone is unconcious, but occasionally when a player dies they simply respawn straight away at the Respawn_West marker (which i have placed miles away from boot_hill or the combat) (does this have to be in, if I dont want respawns?)

Why is this happening?

Cheers

Mate email me your mission here (norrin@<hidden>) and I'll take a look.

uait
Sep 24 2009, 09:47
excuse me norrin...i dont want annoy you...

i have this problem...

if you have time to answer do it, if you haven't i search solution on my own :)



_soldier = (
switch (d_own_side) do {
case "EAST": {"soldierEB"};
case "WEST": {"soldierWB"};
case "RACS": {"soldierGB"};
}
);

_NORRN_can_revive = "FR_Corpsman"; //array no.19
_NORRN_can_revive_2 = ""; //array no.20
_NORRN_can_be_revived = _soldier; //array no.21
_NORRN_can_be_revived_2 = ""; //array no.22


* in array 21 i try also with soldierWB


i have tray some different way but problem still there. i can see in FR_Corpsman revive option and when i click the animation start... but people dont respawn.

as i say... thank you anway i love your work!

norrin
Sep 24 2009, 13:01
@<hidden> - try this mate


_soldier = (
switch (d_own_side) do {
case EAST: {"soldierEB"};
case WEST: {"soldierWB"};
case resistance: {"soldierGB"};
}
);

vengeance1
Sep 24 2009, 13:11
NORRIN,

I integrated SLX_Ragdoll V2.0 into my SLX directory and have not seen anymore issues with Mobile?? Anyway for me don't see it anymore.

uait
Sep 24 2009, 18:19
@<hidden> - try this mate


_soldier = (
switch (d_own_side) do {
case EAST: {"soldierEB"};
case WEST: {"soldierWB"};
case resistance: {"soldierGB"};
}
);

sry norrin doesnt work ;)

i try another way eheh

thank for your time!

[GLT] Legislator
Sep 24 2009, 20:16
@<hidden>:
Regarding the mission I sent you, I did some tests :) Camera for independent sides works as well as the mobile respawn marker :yay:

norrin
Sep 27 2009, 05:46
Revive Update 0.3e
Download here: http://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.

PeterEyres
Sep 27 2009, 13:24
Hi Norrin, I wont send you my mission if you are taking a step back for a while, I've made a workaround in this mission (teleport flag on the marker) and its still a very rare occurance.

Hope you take a rest and come back refreshed