Jump to content
Sign in to follow this  
norrin

SQF revive script

Recommended Posts

hi mate

noticed an issue with v_02e of the ACE revive script.

there have been a few times when the revive option is pesented to a player .. the actions and animations are played but the unit isnt revived .. instead the unit is spawned at the respawn west marker ... this happens to both playable and ai units ...

the options to drag body and examine seem to be a lot easier to find with the new version :)

great work mate

Share this post


Link to post
Share on other sites

Hi guys,

Sorry I've been away and have only just got back. Now the new forums are up, I'll write up the new implementation notes for the scripts and post the new ACE versions of the scripts later in the week.

@Shark and Bear - can you please send me your missions to norrin@iinet.net.au so I can take a look at them.

@sdBoB - sent you both the new AI_disabled ACE revive and the fixed POW script.

norrin

Share this post


Link to post
Share on other sites

@Shark_attack - Mate, just had a thought. Can you try reducing the respawndelay from 4 to 3 seconds in the description.ext eg.

respawndelay = 3;

and let me know what happens?

Share this post


Link to post
Share on other sites

hi mate

got your pm .. will post the mission ...

ohh ... i was using a 3 second delay .. ill try with 4 ?

Share this post


Link to post
Share on other sites

Revive Script Updates

As always I'm sorry there's so many versions but I'm trying to create a one size fits all solution with the ACE revive and vanilla revive scripts which can be used with both the AI enabled and disabled.

* There's heaps of fixes in these scripts and many improvements to MP and JIP compatability

* When using mobile respawn points you no longer have to create a "mobile" marker in the editor.

* There's a new variable (_mobile_type) to set in the revive_init.sqf relating to mobile respawn points

ACE

ACE Revive

http://www.norrin.org/downloads/ACE_revive/ACE_revive_03.sara.rar

* for both AI disabled and enabled missions

ACE AI Disabled revive

If you have a large ACE mission eg 10 + players and it is designed for use with the AI disabled then you may be best to use this script instead of the ACE Revive script.

http://www.norrin.org/downloads/ACE_revive/ACE_revive_AI_dis_03.Intro.rar

* for AI disabled missions only

* tested on a dedicated server with 20 players no bugs seen so far - Many thanks to ZSU (http://www.zspecialunit.org/forums/ ) for their testing of this script.

* for ACE versions of scripts at times it can be difficult to get the revive and examine actions etc. If this is the case try looking at the unit's feet or head and zooming in (default right mouse) as I find this will make the action appear. If this doesn't work move slightly around the unit and try zooming in again.

Vanilla

http://www.norrin.org/downloads/Revive_beta/ArmA_revive_62.sara.rar

* for both AI disabled and enabled missions

As with ACE versions in large missions where the AI disabled it may be best to use the AI_disabled version of this script available in the first post of this thread (version X_1.52).

NB: Script implementation notes are contained in the compressed files, for ACE versions make sure you also read the important.txt files for additional information on implementing these scripts in ACE missions.

If you come across any bugs please try to get screen shots and post them in this thread.

The gpu in my gaming rig fell over last week and I'm still awaiting delivery of my new card so it maybe some time before I'm able to work on these scripts again. Also with the imminent release of ArmA2 that may be it as far as new releases go for the time being. Heaven forbid that there is still a need for these scripts in ArmA2 but if there is I will consider updating these scripts then.

Edited by norrin

Share this post


Link to post
Share on other sites

Hey norrin,

nice to see, that you still support the vanilla ArmA Revive. :)

Well i think you should try to clean up the "revive_init.sqf" a little bit.

By this i mean exclude stuff which is not interested for the users.

Example:

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

and/or

//Add Revive Functions
Norrn_AIBehaviour 		= Compile PreprocessFile "revive_sqf\functions\AIBehaviour.sqf";
Norrn_WaterFix			= Compile PreprocessFile "revive_sqf\functions\WaterFix.sqf";
GetTerrainSlope 			= Compile PreprocessFile "revive_sqf\functions\GetTerrainSlope.sqf";  //Add terrain slope function from Warfare thanks to BIS
Norrn_SlopeFix 			= Compile PreprocessFile "revive_sqf\functions\SlopeFix.sqf";
Norrn_CallOut			= Compile PreprocessFile "revive_sqf\functions\CallOut.sqf";
Norrn_UncAnimFix 			= Compile PreprocessFile "revive_sqf\functions\UncAnimFix.sqf";
Norrn_DeleteUncBody	 	= Compile PreprocessFile "revive_sqf\functions\DeleteUncBody.sqf";
Norrn_LeaderFix	 		= Compile PreprocessFile "revive_sqf\functions\LeaderFix.sqf";
Norrn_LivesRemain 		= Compile PreprocessFile "revive_sqf\functions\LivesRemain.sqf";
Norrn_RespawnPos1 		= Compile PreprocessFile "revive_sqf\functions\RespawnPos1.sqf";
Norrn_RespawnPos2		 	= Compile PreprocessFile "revive_sqf\functions\RespawnPos2.sqf";
Norrn_RespawnPos2AI	 	= Compile PreprocessFile "revive_sqf\functions\RespawnPos2AI.sqf";
Norrn_Call4Help			= Compile PreprocessFile "revive_sqf\functions\I_need_help.sqf";
Norrn_DialogBlink 		= 0;

[] execVM "revive_sqf\revive_init.sqf";

// Initialise isplayer script
[NORRN_player_units] execVM "revive_sqf\isplayer.sqf";

if (isServer) then 
{
mission_Over = false;
publicVariable "mission_Over"; 

// Initialise mission end script
if (_mission_end_function == 1) then {[NORRN_player_units] execVM "revive_sqf\mission_end.sqf"};

// Initialise marker color script
if (_no_enemy_sides > 0) then {[] execVM "revive_sqf\marker_color.sqf"};

// Initialise mobile spawn function
if (_mobile_spawn == 1) then
{ 
	if (_mobile_type == 0) then 
	{
		[r_mobile_spawn_vcl, 0] execVM "revive_sqf\mobile\move_spawn.sqf"
	} else {
		NORRN_mobile_man = ObjNull;
		[_mobile_man, 1] execVM "revive_sqf\mobile\move_spawn.sqf"
	};
};
//set and broadcast revive variables for each possible unit at mission start
{call compile format ["%1_revives = 0; publicVariable '%1_revives'", _x]}forEach NORRN_player_units;
{call compile format ["%1_a = false; publicVariable '%1_a'", _x]}forEach NORRN_player_units;

};

//create mobile respawn marker
if (_mobile_spawn == 1) then {[] execVM "revive_sqf\mobile\mobile_marker.sqf"};

//initialise mobile spawn script if player is mobile respawn unit 
if (player == _mobile_man) then 
{
[_mobile_man, _mobile_man] execVM "revive_sqf\mobile\mobile_spawn.sqf";
NORRN_mobile_man = player;
publicVariable "NORRN_mobile_man"; 
};

//Camera Options - hoz and mandoble's free cam settings, OFPEC - see: http://www.ofpec.com/forum/index.php?topic=32970.0
OFPEC_MouseCoord = [0.5,0.5];
OFPEC_MouseScroll = 0;
OFPEC_MouseButtons =[false,false];
OFPEC_camzoomspeed = 0.25;
OFPEC_maxzoomout = 400;
OFPEC_range_to_unit = 5;  //starting dist from target

if (true) exitWith {};	

//Last edited 27/04/09

I mean to load stuff which can/must not be edited by the user to load outside of the "revive_init.sqf"

You know ppl not familar with scripting may could be confused by it. ( I think )

Anyway thanks for the update! :D

Share this post


Link to post
Share on other sites

excellent norrin I will try it in my VTS mission

Share this post


Link to post
Share on other sites

As Always we appreciate your hard work, thanks for keeping us all updated.

Vengeance

Share this post


Link to post
Share on other sites

hello norrin last version work well (revive 0.3 & ACE 1.07)

2 little problems

vehicle in fire make no damage to players

and drag body don't work (nothing in menu to drag body)

_unconscious_drag = 1;

Edited by gonza

Share this post


Link to post
Share on other sites

Hi Norrin, I'm using the latest ACE AI-Disabled version. The problem i have is that, when i try the script on my mission, i get extreme slow down with my game once the revive script kicks in. Basically as soon as the respawn timer counts down and the unconcious camera comes up, my game becomes almost unresponsive. This has also been confirmed by others in my squad.

Share this post


Link to post
Share on other sites

@ gonza - ACE revive uses the built in drag function from ACE - I've noticed that sometimes its quite hard to get the drag/examine actions to appear - I've found that if you look at the unconscious units legs or head and then zoom in (default right mouse button) then the action will appear - if this doesn't work then move around the unit a little and try again.

The ACE burning ie. fire is disabled when using revive (you'll notice the code you put in the init.sqf) as this ACE function interferes with the revive script - not much I can do about this I'm afraid unless I modify the ACE addon.

@ Shadow.D. ^BOB^ - that definitely shouldn't be happening. Check the _follow_cam_distance setting in the revive_init.sqf. I usually have this set to 250 metres. If you set it really high, eg. 10,000, then the camera is going to lag up as the script checks all the alive units within this radius every 0.01 seconds. Depending on how many units you have in mission you'll have to increase or decrease this distance. If this isn't the problem then please send me your mission with links to any addons to norrin@iinet.net.au.

Share this post


Link to post
Share on other sites

ok thanks, no problem

it is not very important

do you know if there is an option for change the respawn time

because in my missions, players could use the revive script or not (param1)

but 4 sec is to small is it possible to change the respawn time in the init.sqf when they don't choose use the revive ?

Share this post


Link to post
Share on other sites
ok thanks, no problem

it is not very important

do you know if there is an option for change the respawn time

because in my missions, players could use the revive script or not (param1)

but 4 sec is to small is it possible to change the respawn time in the init.sqf when they don't choose use the revive ?

I may be wrong but I don't think you can change the respawnDelay in the description.ext based on the setting of param1 or 2. Instead you could simulate increasing the respawn time by blacking out the screen (eg using titletext) when a unit dies for the amount of time you want the respawn delay to last.

Share this post


Link to post
Share on other sites

Cheers for that Norrin, the spect distance was indeed the problem. Trying to load over 300 insurgents in lol.

All sorted and working sweet as, thanks alot.

Share this post


Link to post
Share on other sites

Quick Fixes for ACE and Vanilla Revive Scripts

NB: the fixed files are not for the AI_disabled versions of these scripts

I've fixed a few bugs to improve the scripts compatibility when using friendly non-respawning AI units with playable revivable units. Just replace the revive_sqf folders in your mission directories with the ones you can download from here:

ACE revive fix: http://www.norrin.org/downloads/ACE_fix/ACE_revive_sqf.rar (updated with fix from v03d - see post below)

Vanilla_revive fix: http://norrin.org/downloads/Revive_fix/vanilla_revive_sqf.rar

For the complete script suites

ACE revive: http://www.norrin.org/downloads/ACE_revive/ACE_revive_03d.sara.rar

Vanilla_revive: http://norrin.org/downloads/Revive_beta/ArmA_revive_62b.sara.rar

Edited by norrin

Share this post


Link to post
Share on other sites

ACE_revive and ACE_AI_dis_revive update

Here's today's hotfix banghead.gif

No need to use this unless you want to enable the ACE fire burn function.

Hot fixes if you want to enable ACE fire burn:

1. ACE revive: http://www.norrin.org/downloads/ACE_fix/Revive_player.sqf

2. ACE AI disabled revive: http://www.norrin.org/downloads/ACE_fix/r_killedhandler.sqf

Just copy the appropriate downloaded file over the existing one in the revive_sqf folder. Also delete the following code from the init.sqf

/*
//re-enable code if you want to disable ACE burning
[] spawn {
waitUntil {!isNil "ACE_FireBurn"};
ACE_FireBurn = {_nothing = nil};
};

Full scripts

1. ACE revive (v03d): http://www.norrin.org/downloads/ACE_revive/ACE_revive_03d.sara.rar

2. ACE AI disabled revive (v03c): http://www.norrin.org/downloads/ACE_revive/ACE_revive_AI_dis_03c.Intro.rar

NB: Due to technical difficulties with my rig I haven't been able to test these revisions as much as I'd have liked so please let me know if you run into any problems.

Edited by norrin

Share this post


Link to post
Share on other sites

it work fine thanks (excellent job)

but is it ACE or the revive script who revive AI (sometime when you kill an AI she revive after some minutes)

missions are really hard with that

is it possible to delete that

Edited by gonza

Share this post


Link to post
Share on other sites

If you're talking about enemy AI then the problem is related to ACE and not to the revive scripts. I think what you're seeing is the AI being shot and falling unconscious (not killed) due to the ACE wounds function. After a period of time these units will recover and will start shooting again, which can be quite bothersome and has been much complained about.

The only way to prevent this is to examine each downed enemy unit, then if they are unconscious deliver a coup de grâce. You may be able to switch off the ACE AI wound scripts using one of the ACE game logics in the map editor (I don't have ACE in front of me at the moment so I'm not entirely sure about this).

If that's no good I think the AI fall unconscious in ACE when their damage reaches 0.75. So you could possibly add a "hit" eventhandler to each AI that sets their damage to 1 if their damage level is higher than 0.75. It will make them easier to kill but its probably the easiest way to stop them from waking up unexpectedly and shooting you in the back.

Edited by norrin

Share this post


Link to post
Share on other sites

ok thanks

I will ask ACE team

in ACE, the fact that an AI can be revived by an otherone is really cool (it is excelent to see that)

but the fact that AI can recover herselfe is not good

Share this post


Link to post
Share on other sites

Hi norrin,

i run into a problem with the latest AI-Enable Vanilla Revive.

I tryed v.61e and v.62b and i have the same problem with bouth versions.

After i was killed and a few seconds after the spectating script has started the cam will go to any point on the island 300 meters away from me and then zoom to my position within a few seconds.

Also after this happend i loose the control of the spectating script.

So i can't change the cam any more and the call help butten also is not avalaible any more.

Is this a know'n bug?

EDIT: The last version of the AI-Enable Revive i always get to work 100% is AI_enabled_051b

Edited by SNKMAN

Share this post


Link to post
Share on other sites

Hi SNK,

There's been quite a few changes to the revive_init.sqf since 0.51 so could be a config problem. Could you please send me your mission to norrin@iinet.net.au and I'll take a look at it.

Thanks,

norrin

Share this post


Link to post
Share on other sites

Hi norrin,

thanks for the support, but right now i fixed the problem by myself. :)

I had forget to change

_respawn_position = 0;

Now everything works fine. :)

B.t.w.: Very good new features!!

I really love the call for help feature and all the informations displayed in the revive dialog.

Keep up the good work. :thumb:

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
Sign in to follow this  

×