Jump to content
Sign in to follow this  
norrin

SQF revive script

Recommended Posts

AI_Disabled Revive Update (version 1i 9th October 2007)

Here we go again smile_o.gif

You can get the latest version of this script from here (EDIT: replaced by version j 10th October '07)

New functions

Added the respawn_position function so that when the revive timer runs out the mission maker now has the option to have the unit die, respawn at base_1 or respawn at the nearest friendly base to where the player died.

Also added instructions in the init.sqf readme on how to set up a

1. a variable number of revives in the mission start-up screen via parameters

2. a simple setting for an infinite number of revives.

3. information on compatability with TJ72s transport chopper script

Fixes

Esc key exploit during the unconscious camera

Some other bugs in the camera script.

Now to start working on the AI_enabled script again sad_o.gif

Share this post


Link to post
Share on other sites
Norrin, do you have Queens Gambit? The mission I mentioned (UN soldiers) has got Queens Gambit content.

Yeah I do. Maybe you could send me your mission and I'll take a look at it.

Share this post


Link to post
Share on other sites

New version of AI_disabled script (version 1j 10th October 2007)

Once again I've inadvertantly managed to add a bug to the latest version of the AI_disabled script.

You can get a new version of this script from here that fixes this bug.  

Sorry guys.

There's also still problems when combining TJ72's Airlift script and the revive so don't try it for the time being.

Thanks to Vengeance1 for helping me find my mistake.

Share this post


Link to post
Share on other sites

hello

excelente script

I report a little bug

sometime when you are dead , AI continous to fire on your dead body

but I dont have test the last version of AI_disabled revive script version 1.0j so i will test it tonight and I dont have time for the moment to see if this bug was reported by someonelse

sorry (29 pages to read... crazy_o.gif )

############################################

for this option

//Time until respawn button appears (0 = approx. 12 seconds)

//Set to a high number like 100000 seconds if you do not want to use this option

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

respawn_button_timer = 10000;

the respawn_button appear only if everybody is dead in the squad ?

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

Share this post


Link to post
Share on other sites

Hey norrin,

Thanks for all the work.

Can we get the MP version or should I say the PvP version updated? And include a toggle to all AI Medics to help save fellow human players as we use both PvP and helper AI for the mundane stuff like Observation Posts and protecting the BFCO. Thanks

ViperMaul

Share this post


Link to post
Share on other sites
Hey norrin,

Thanks for all the work.

Can we get the MP version or should I say the PvP version updated? And include a toggle to all AI Medics to help save fellow human players as we use both PvP and helper AI for the mundane stuff like Observation Posts and protecting the BFCO. Thanks

ViperMaul

Yeah I should have a script that does exactly that from a very early version of the script archived somewhere on my HD. I'll track it down and set it up to work in the PvP script.

@gonza - I'm not sure what version you've used in the past but for sometime now the unconscious unit gets set as a captive by the script so the enemy units should not target them while they are lying there. I can't promise you they won't as this is ArmA we're talking about but they shouldn't.

If you want the respawn dialog to appear the moment all the players are dead make sure you switch off the mission end function and toggle on the all_dead_dialog ie. set it to 1. You can find both in init.sqf. So it doesn't matter what time you set in the respawn_button_timer.

Share this post


Link to post
Share on other sites

Hi Norrin,

Thanks for all the help, you rock dude! Latest version of Disabled runs great!

Vengeance. notworthy.gif

Share this post


Link to post
Share on other sites

hello Norrin

and thanks for your answerer

sorry but I have an other question

in my mission , the goal is to capture a general and bring him to a extraction point

the mission work well but I want that the general leave the group if all players die

if I don't do that , if players have captured the general and after that all players units are dead , they will respawn at the insertion point (with the respawn dialog) and the general will traverse all the map allone to return in formation

where could I put my little script to force the general to leave the group when the respawn dialog appear ?

if someone want to see my work

I have put a the (excelent notworthy.gif last version of norrin revive script ## 1j 10th October 2007)

my mission

{Gonza}Co_10_popoff_cap_18.Sara.pbo

an other question on the kegetis specating script

(someone know how to disabled the dot TAG for ennemis forces (red point hover all ennemis AI)

Share this post


Link to post
Share on other sites
in my mission , the goal is to capture a general and bring him to a extraction point

the mission work well but I want that the general leave the group if all players die

if I don't do that , if players have captured the general and after that all players units are dead , they will respawn at the insertion point (with the respawn dialog) and the general will traverse all the map allone to return in formation

where could I put my little script to force the general to leave the group when the respawn dialog appear ?

Gonza download this modified version of the camera_follow.sqs and copy it over the one in the revive_sqf folder.

Create a trigger on the map:

Activation: Game Logic Repeatedly

Condition: revive_all_dead

On Act:  Run your script to force the general to leave the group

and that should do it.

Share this post


Link to post
Share on other sites

Norrin you are my king   inlove.gif  notworthy.gif

I will test it tonight

yay.gif

Share this post


Link to post
Share on other sites
Norrin you are my king inlove.gifnotworthy.gif

I will test it tonight

yay.gif

please let us know when you complete your mission.

I will add it to the database with only revive missions...;)

Share this post


Link to post
Share on other sites

just report a very little bug (it is not realy a bug)

if I make a preview off my mission in the editor

and if I die , I cant return in the editor ,the keybord and mouse bouton are enabled

the only solution is to kill arma process

last version of my revive script mission (I think last version)

{Gonza}Co_10_popoff_cap_18.Sara.pbo

@tomcat I have 3 revive script missions in preparation (excelent initiative to regroup mission whit revive script)

Share this post


Link to post
Share on other sites

Because of less time only a short bug report:

AI Disabled 1.0h

- some players couldn't be revived, only self-respawn and new revival helped 'em

- the players want to stand up earlier after spawning at a spawn point

- minor problem in AI Disabled: still have to say "1, ready" in order to have the others follow me tounge2.gif

I don't know if there are fixed in the new version.

AI Enabled Beta 0.20

- still have to kill the AI that can't be revived in order to safe them and let them join the party again

- major problem in AI Enabled: still have to say "1, ready" in order to have the others follow me sad_o.gif I don't think its your fault, norrin. I guess it's a bug/feature of ArmA

Share this post


Link to post
Share on other sites
Because of less time only a short bug report:

AI Disabled 1.0h

- some players couldn't be revived, only self-respawn and new revival helped 'em

- the players want to stand up earlier after spawning at a spawn point

- minor problem in AI Disabled: still have to say "1, ready" in order to have the others follow me tounge2.gif

I don't know if there are fixed in the new version.

AI Enabled Beta 0.20

- still have to kill the AI that can't be revived in order to safe them and let them join the party again

- major problem in AI Enabled: still have to say "1, ready" in order to have the others follow me sad_o.gif I don't think its your fault, norrin. I guess it's a bug/feature of ArmA

I've change the timings in the latest version (1j) of the AI_disabled script so hopefully the non reviving thing has been fixed now, the follow leader bug will still exist though.

Share this post


Link to post
Share on other sites

this little bug is allway present in the 1.0j version

sometime when you are inconsious , AI continous to fire on your dead body

this is not a big probleme

Share this post


Link to post
Share on other sites

Possible fix for AI enabled null variable error

OK I think I may have finally tracked down the null variable error in the AI_enabled revive script. Legislator or Vengeance if you get a chance could you please try this new revive_player.sqf file and let me know what happens. Just replace the revive_player.sqf in the revive_sqf folder with the one in the zip file.

Other than the fix I've simplified quite a bit of the code so hopefully I haven't added any other errors.

I doubt this will fix the follow the leader bug but it might just help with the enemy units firing on the unconscious player. If it does work I'll add these changes to the AI_disabled script.

EDIT: I've also got a fix for non-reviving units but it makes them stand up once they are revived which may expose them to enemy fire so let me know if you want me to enable it.

Share this post


Link to post
Share on other sites

I'll give it a try Norrin, by the way I saw that Follow the Leader issue last night testing with Disabled AI.  All of a sudden my (Recruited) soldiers would not Fall Into Formation any more.  Wierd

OK CONFUSED? Your descriptions says try for AI Enabled but file folder in download says AI Disabled??

Share this post


Link to post
Share on other sites
I'll give it a try Norrin, by the way I saw that Follow the Leader issue last night testing with Disabled AI.  All of a sudden my (Recruited) soldiers would not Fall Into Formation any more.  Wierd

OK CONFUSED?  Your descriptions says try for AI Enabled but file folder in download says AI Disabled??

I really am an idiot at times. confused_o.gif

Its definitely for the AI_enabled script m8.  I've updated the name of the zip file in the link above or get it from here

With the follow the leader bug does this still happen if you order the units to rejoin formation? Anyway I'll add the follow the leader code to the AI_disabled script and add some changes I've just thought of in the hope that it fixes the problem.

Share this post


Link to post
Share on other sites

Thanks Norrin, I will put it in my map for AI.

Yes the Rejoin Formation errors in AI Disabled, tells them to follow All or some other member. You have to command one at a time.

Vengeance Out!

Share this post


Link to post
Share on other sites

hello

@norrin

could you put a link to the tomcat missions revive tread in the first message of this tread and tell to missionmakers to add _rev to at the end of there missions name ?

it would be good to give people some exemple of your script

http://www.realityfriends.com/forum/viewforum.php?f=45

thanks

I will add the revive script on all good missions that I have meet

@missionsmakers

give your creation to tomcat in this tread

http://www.flashpoint1985.com/cgi-bin....1166565

to regroup revive missions and promote the revive script

you can name your missions like that "co12_missionsname_10_rev"

12 = Nb players

10 = 10 version of the mission

rev = incl. revive script

Share this post


Link to post
Share on other sites

3 Things and im using newest ai-disabled script...

1. Hi could it be possible that camerascripts have some issues when using your script? In my case it will not exit the camera script.

2. After changing all the eventhanlders mentioned in your readme from 0 to 1 and activating "invisible unconscious", it seems that grouplink2plus enemy-groups dont call for support anymore and they wont recognize anything (me) until im in front of them.

3. Im having still this error at beginning of my mission.(same as Legislator had):

bug2wl4.th.jpg

What can we do to solve that?

EDIT:

1. ist solved, was my mistake

2. ive made all the changes back before i posted this and now it works, although i didnt have the invsible at unconscious.

3. is still present

Share this post


Link to post
Share on other sites
3 Things and im using newest ai-disabled script...

1. Hi could it be possible that camerascripts have some issues when using your script? In my case it will not exit the camera script.

2. After changing all the eventhanlders mentioned in your readme from 0 to 1 and activating "invisible unconscious", it seems that grouplink2plus enemy-groups dont call for support anymore and they wont recognize anything (me) until im in front of them.

3. Im having still this error at beginning of my mission.(same as Legislator had):

What can we do to solve that?

EDIT:

1. ist solved, was my mistake

2. ive made all the changes back before i posted this and now it works, although i didnt have the invsible at unconscious.

3. is still present

Sorry for the delay in replying but I've been a way for a couple of days and I've only just seen your post.  

I've never used GPL2+ and the fix was recommended to me but I've just looked at it and it uses up to 2 hit addeventahndlers as far as I can tell<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;

Taken from ArmA Group Link II Plus! Script by SNKMAN

Add event handler to each player (in targetgroup only)

if (group player == _this select 3) then {{_x AddEventHandler ["Fired", {_this exec "GL2Plus\GL2Plus_Detected\Weapon_Class.sqs"}]}} forEach (units group player)

; Check if AI should react to suppresive fire, if add another event handler to each player (in targetgroup only)

if ((group player == _this select 3) && (count (units group player) > 1) && (KEY_AIsuppresivefire)) then {{_x AddEventHandler ["Fired", {_this exec "GL2Plus\GL2Plus_Detected\GL2Plus_Bullet_Range\Enemy_Range_Suppressed.sqs"}]}} forEach (units group player)

; Add event handler "Fired" to each unit (in targetgroup only) ( Voice attack gun fired )

if ((group player == _this select 3) && (KEY_DynamicVoice)) then {{_x AddEventHandler ["Fired", {if ((count units (_this select 0)) >1) then {_this exec "GL2Plus\GL2Plus_Detected\GL2Plus_Bullet_Range\Player_Range_Attack.sqs"}}]}} forEach (units group player)

; Add event handler "Hit" to each unit (in targetgroup only) ( First Aid and Hit Effects )

if ((group player == _this select 3) && (KEY_InjuredEffects)) then {{_x AddEventHandler ["Hit", {_this exec "GL2Plus\GL2Plus_Injured\Hit_Effects.sqs"}]}} forEach (units group player)

; Add event handler "Hit" to each unit (in targetgroup only) ( First Aid Kit )

if ((group player == _this select 3) && (KEY_InjuredEffects)) then {{_x AddEventHandler ["Killed", {(_this select 0) removeAction FirstAid; (_this select 0) removeAction GiveFirstAid; (_this select 0) addaction ["Take First Aid Kit","GL2Plus\GL2Plus_Injured\Aid\Add_Kit.sqs"]}]}} forEach (units group player)

; Add event handler "Hit" to each unit (in targetgroup only) ( Voice hit )

if ((group player == _this select 3) && (KEY_DynamicVoice)) then {{_x AddEventHandler ["Hit", {if ((count units (_this select 0)) >1) then {if (getdammage (_this select 0) <= 0.8) then {_this exec "GL2Plus\GL2Plus_Dynamic_Voice\Player_Injured\Client.sqs"}}}]}} forEach (units group player)

; Add event handler "AnimChanged" to each unit (in targetgroup only) ( Voice weapon reload )

if ((group player == _this select 3) && (KEY_DynamicVoice)) then {{_x AddEventHandler ["AnimChanged", {if ((count units (_this select 0)) >1) then {if({(_this select 1) == _x} count ["WeaponMagazineReloadStand","WeaponMagazineReloadKneel","WeaponMagazineReloadProne","PistolMagazineReloadStand","PistolMagazineReloadKneel","PistolMagazineReloadProne","LauncherReloadKneel"] > 0) then {_this exec "GL2Plus\GL2Plus_Dynamic_Voice\Player_Reloading\Client.sqs"}}}]}} forEach (units group player)

; Add event handler "Fired" to each unit (in targetgroup only) ( Voice throw )

if ((group player == _this select 3) && (KEY_DynamicVoice)) then {{_x AddEventHandler ["Fired", {if ((count units (_this select 0)) >1) then {if((_this select 1 == "Throw")) then {_this exec "GL2Plus\GL2Plus_Dynamic_Voice\Player_Grenade\Client.sqs"}}}]}} forEach (units group player)

; Add event handler "Killed" to each unit (in targetgroup only) ( Voice killed )

if ((group player == _this select 3) && (KEY_DynamicVoice)) then {{_x AddEventHandler ["Killed", {if ((count units (_this select 0)) >1) then {_this exec "GL2Plus\GL2Plus_Dynamic_Voice\Player_Killed\Client.sqs"}}]}} forEach (units group player)

 Therefore if you are using both the "first aid and hit effects" and "voice hit" effects you'll need to renumber the revive_player.sqf remove hit eventhandlers to 2 (I think) eg.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _name removeEventHandler ["hit", 2];

_name removeEventHandler ["dammaged", 0];  

Error 3 sounds like a configuration error so if you like send me your mission to norrin@iprimus.com.au and I'll take a look at it.

norrin

Share this post


Link to post
Share on other sites

Hi norrin, thanks for reply!

Ive just figured out another error in my mission.

My brother was killed, then he just stands there on the position he was kileld,then was killed a second time just a half second after the first time and then, after i revived him he got the weapons he should become when he respawns at base....

Strange bug and i think it has to do with i set the unconsciuous invisibility to 0, during that eventhandler issues

I hope you can "fix it" for me as you seeing through my mission, i just sent you recently.

Even more bugs found:

We just had a coop-session in my mission with 4 players and the following happens randomly on all players (altough the JIP players had the errors more frequently):

1.After Revive, you cant move yourself but you can shoot and target via ironsight - your weapon is still on back. After some minutes (randomly) you can stand up and play.

2. Getting revived but still be in spectator mode, the units has just took the weapon from back but you are in spectating. Only ESC-pressing once helped out.

3. Sometimes when people got killed, they just can stand up directly after death and continue to play - the will then get the standart weapon i add in the "revive_player.sqf" which we normally only should get, after respawn with respawn-button

4. Spectating stops , when the spectating unit starts to dirve cars, helis, etc.

5. JIP players get respawn-button on mission starting.

6. Many other minor errors with animation after respawn in base via respawn-button, etc....

You are welcome to play a life round of my mission of you like to!

I would be very pleased if you will, ill give you the IP-adress and Name of my machine.

Regards, Christian

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  

×