Jump to content

Recommended Posts

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

Edited by MadTommy

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thank you Norrin! You're awesome.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

@legis

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

Edited by norrin

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

@norrin 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!

Share this post


Link to post
Share on other sites

Yeah some new animations would be cool. Norrin, you could use the "mission" Animation Viewe 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.

Share this post


Link to post
Share on other sites

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

@legis - 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

Edited by norrin

Share this post


Link to post
Share on other sites

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)

Edited by Nephris1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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*

Share this post


Link to post
Share on other sites

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?

Edited by norrin

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

@Legis – 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.

Edited by norrin

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Thanks NORRIN, will integrate it into some missions for testing.

Edited by vengeance1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×