Jump to content
Sign in to follow this  
norrin

SQF revive script

Recommended Posts

This looks great!

I only got one question, could you please implement an timeoption.

A function where you can set a timelimit. So if your not revived after, say 5 minutes, you die. Maybe if this value is "0", there is no limit, but if this limit is maybe "180" you need a medic within 3 minutes or you are dead.

If it's not to much work.

Keep up the great work man!! notworthy.gif

Share this post


Link to post
Share on other sites

yeah i remember a time limit in ofp! lol we had it on 2 mins!

Running round like headless chickens trying to find downed mate before the time was up! smile_o.gif

Share this post


Link to post
Share on other sites
yeah i remember a time limit in ofp! lol we had it on 2 mins!

Running round like headless chickens trying to find downed mate before the time was up! smile_o.gif

hihi

That is true, but then again, you as a mission designer, got an option. That will make you design a mission the way you want it.

it can make your squad keep close to eachother or it may not count at all. It's your choice.

Maybe you will "love" your medic. Maybe it will force you to tell where your going and where you are at all times. I don't know, but I would like a timelimit, so I can "force" my medic to be more careful and then again more aggressive.

Share this post


Link to post
Share on other sites
yeah i remember a time limit in ofp! lol we had it on 2 mins!

Running round like headless chickens trying to find downed mate before the time was up! smile_o.gif

hihi

That is true, but then again, you as a mission designer, got an option. That will make you design a mission the way you want it.

it can make your squad keep close to eachother or it may not count at all. It's your choice.

Maybe you will "love" your medic. Maybe it will force you to tell where your going and where you are at all times. I don't know, but I would like a timelimit, so I can "force" my medic to be more careful and then again more aggressive.

Yepp definately agree that was the point in using it,as we never used respawn

Made the medic more important role within the squad!

As to my first example the fallen mate had been hit by some tank shell or something which sent his body airbourne lol smile_o.gif

Share this post


Link to post
Share on other sites

Guys I've always liked the idea of including an optional revive timer but I'd like your advice on how you want it set up.  If the revive timer runs out do you want the player:

a/ to respawn at the mission start as something of a punishment for dying or not working closely with their team mates (easy to implemet), or

b/ do you want the player to have a choice of respawn points (this will be more difficult to code).  

Anyway let me know.

Share this post


Link to post
Share on other sites

Personally if ya dont get to him by the time limit = Dead!

Never been a fan of respawn in co-ops,but this helps make the medic have a vital roll! smile_o.gif

Share this post


Link to post
Share on other sites

AI_enabled revive update

Here's a long overdue update to the AI_enabled revive scripts (dated 150707).

Here's the changes:

1. Removed the addEventhandlers to improve compatibility with other scripts

2. Removed the blackIn from the onConnect script as it has been interrupting some mission makers intro movies.

Also added the following options to the init.sqf

3. The JIP players now get all unconscious markers placed on their maps when they join. Only if the unconscious_markers options is toggled on of course.

4. Camera options so that it can either focus on the unconscious player or the nearest friendly.

5. Call_out function from the AI_disabled script now implemented

6. Option to toggle on or off the markers showing where the unconscious players are located.

7. Revive action only appears when you are within reviving radius of an unconscious player.

One final thing if you want to remove the "joining mission" screen which is part of this script just comment out (using //) line 10 of the init.sqf. It should look like this if removed <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> //titleText ["Joining Mission", "BLACK FADED", 0.3]; This screen was inserted so that the joining player could get the units' current status ie. conscious or unconscious without the player seeing them 'assume the unconscious position' when they join.

Bugs

Sometimes the AI units don't revive when sent to unconscious bodies, I'm not sure why this is but sending a second AI-unit to the unconscious unit may trigger the revive action.

If you spawn into an unconscious group leader when you are revived you may be armed with your secondary weapon. However, when you shoot the rifle on your back fires. The only way I've found to resolve this bug is to respawn and be revived.

Most importantly please make sure you check out the implementation notes and init file readMe in the zip file before using these scripts.

@ck-claw, that should be pretty easy to implement into the AI_disabled scripts so I'll try and get a new version posted in the next few days.

Share this post


Link to post
Share on other sites

Hey thanks Norrin,but it would only be of use to me for Human Medic mates could use smile_o.gif

Very much appreciate what ya done though! xmas_o.gif

Share this post


Link to post
Share on other sites
Guys, would this script be difficult to implement in PvP game modes?

I've never tried but you should be able to set it up.  I haven't thought this through but you'd need a player array for each side and you may also need at least a revive_player script for each team and different settings in the init.sqf for east and west so it would take a bit of mucking round to get it working but it is possible.

@ck-claw, I can set that up fairly easily m8.  So you want a revive timer ending in death and only human medics can revive is that right?

Share this post


Link to post
Share on other sites

Yes! That would be excellent mate pistols.gif

As our clan mainly play co-ops against the A.I would be nice option to bring back a team-mate? Allbeit on a very strick time limit?

Share this post


Link to post
Share on other sites
Yes! That would be excellent mate pistols.gif

As our clan mainly play co-ops against the A.I would be nice option to bring back a team-mate? Allbeit on a very strick time limit?

I think as long as the missiondesigner can deside how long time, its ok.

I would like to become a seagul (always using Kegeteys spectating view) so I can watch remaining players have some fun.

Looks great man. Keep up the good work!

Share this post


Link to post
Share on other sites

Definately Mate!

I actually spend more time in 'Kegetys Spectating Script' than playing! whistle.gif

Share this post


Link to post
Share on other sites

AI_disabled revive script update

You can get the latest version from here (18th July 2007)

There is now a new option for mission makers, the revive_timer option.  This option allows mission makers to specify a revive time limit.

If the unconscious player is not revived within that time limit the player either:

a. respawns at  Base_1; or

b. dies.

If you are using the respawn at Base option then I strongly recommend that you place Base_1 at the mission start point to act as an incentive not to be killed.

 

If you are using the die option then you have a further two choices when the player dies he can either see a black screen with a message that he is dead or kegetys spectator script can be enabled.

Very Important: When using the revive_timer option you should disable the all_dead_dialog, the nearest_teamate_dialog and set the respawn_button_timer to a higher value than the revive_time_limit.

In addition, as the isKindOf command is working on a dedicated server you can now specify what sort of units are capable of reviving in the init.sqf without resorting to another version of the script. For instance just set the <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">can_revive = "soldierWB"; to <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">can_revive = "soldierWMedic"; on line 43 of the init.sqf if you want only medics to revive.

There’s also been a couple of minor changes to onConnect script to improve compatibility with intro films etc and as I said for the latest AI_enabled script just remove the “Joining Mission†screen with a // on line 12 of the init.sqf if you don’t want to use this option eg:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//titleText ["Joining Mission", "BLACK FADED", 0.4];

I’d also like to thank kegetys for his fantastic spectating script and I hope he doesn’t mind that I’ve changed a couple of lines to help reduce some incompatibilities between his and my scripts.

Bugs:  As I said in testing I’ve run into a few incompatibilities with the spectating script and I’ve done my best to get rid of these but it’s a complex script and I always find it hard to follow someone else’s scripting logic so you may run into more of these, infact I’m pretty sure you will.  The last remaining problem I’ve found is if you are spectating a player when it is killed the camera goes to a nice view of the ocean but if you just click on the A or D keys it will move the camera onto the next unit and you shouldn’t have any probs.

As always check out the latest implementation notes and init.sqf readme before using the new scripts

Anyway let me know how you go.

norrin

Share this post


Link to post
Share on other sites

notworthy.gif nice work.

I have put this in a coop im making and all works fine. Except, when all members of the team die the mission doesn't end properly.

I have tried changing some values in in the .init as explained in the .init readme file but to no avail.

All the guys just lie on on the ground bugging up and down.

Apart from that, awsome work. I love the cries for help. rofl.gif

when i try and place an end mission trigger, ie blufor not present , end#2, I get an error message saying theres no value from the master server.

any idea on what i'm doing wrong?

Share this post


Link to post
Share on other sites
notworthy.gif nice work.

I have put this in a coop im making and all works fine. Except, when all members of the team die the mission doesn't end properly.

I have tried changing some values in in the .init as explained in the .init readme file but to no avail.

All the guys just lie on on the ground bugging up and down.

Apart from that, awsome work. I love the cries for help. rofl.gif

when i try and place an end mission trigger, ie blufor not present , end#2, I get an error message saying theres no value from the master server.

any idea on what i'm doing wrong?

To be honest I haven't tried the end mission function with all of the new features so there is a chance some will be incompatible.

Despite this if the units are all bobbing up and down while lying down when they are all unconcious its almost working its just not activating the end trigger for some reason. The end trigger is automade when the mission starts and uses the End1 trigger type so if you've got another End1 trigger you've placed in the editor yourself the two might be conflicting.

Anyway if your still having probs send your mission file (and links to any addons you've uesd) to me at norrins_nook@iprimus.com.au and I'll see if I can work out whats going on.

norrin

Share this post


Link to post
Share on other sites

AI_revive update

Here's another single file change for the AI_disabled revive script.

I had a request at Armaholic to set up the camera_follow.sqs script so that it had a preference for attaching itself to human players rather than friendly AI. So this is what the new version does, however, if there are no players within the 100 metre camera radius or they are all unconscious then the camera attaches itself to the nearest friendly AI. If there are no friendly AI within 100 metres then the camera focuses on your own unconscious body. If a player moves within the cam radius while the camera is attached to an AI it will then attach itself to that player.

You can get the new camera_follow.sqs from here (camera_follow_200707.rar)

Its only been tested with the AI_disabled scripts so far but it should also work with the AI_enabled scripts as well.

To use the new camera just replace the existing camera_follow.sqs, which you can find in the revive_sqf folder, with the one in the zip file.

Share this post


Link to post
Share on other sites

Hey Norrin,

Hows me human medic only/time limit coming along? smile_o.gif

Btw now your gonna tell me it twas that one on the last page? wink_o.gif

Share this post


Link to post
Share on other sites
Hey Norrin,

Hows me  human medic only/time limit coming along?  smile_o.gif

Btw now your gonna tell me it twas that one on the last page?  wink_o.gif

Don't know how I'm going to break this to you m8 but it was on the last page smile_o.gif No seriously.  

BTW: I've got another revision coming out hopefully later today if I get a chance to write everything up

Share this post


Link to post
Share on other sites

LOL -thought as much mate!

Just looked at it sober wink_o.gif and thought it might of been the AI one still! biggrin_o.gif

Many Thanks will get round to trying it! yay.gif

Edit:- Ah ok i'll wait for revised edition! smile_o.gif

Share this post


Link to post
Share on other sites

AI_disabled revive script release version 1.0

revive_5.jpg

I know now that I’m saying this is no longer a beta version someone is going to find a show stopping bug but anyway Version 1.0 is available from here (23rd July 2007) smile_o.gif

Description

Creates playable units that fall unconcious when killed which can then be revived – designed for use with AI-disabled CO-OP missions

Features and Options

• max_no_respawns - can specify how many times a player can be revived before he dies outright

• can_revive - can specify what sort of units can revive other players, for instance all ground troops or medics only

• mission_end_function – option of ending the mission when all player units are unconscious or dead.

• reward_function – allows the mission designer to configure the number of revives of other players required to earn the reviving player an extra life.

• team_kill_function – allows the mission designer to specify the number of team kills a player can commit before he is penalised one life.

• Respawn dialogs – from 0 - 4 respawn points can be placed on the map at which unconscious units can respawn

Respawn Dialog sub options

a. all_dead_dialog -  allows the automatic appearance of the respawn dialog if all units are unconscious.

b. JIP_spawn_dialog - the mission maker can now set the amount of time before JIP players can access the respawn dialog when they first join the mission.

c. nearest_teammate_dialog - measures the distance between the unconscious unit and the nearest friendly unit if the set a distance is exceeded the respawn dialog automatically appears

d. Option of specifying up to 2 enemy sides.  If units from these enemy sides are within 50 metres of the spawn point the option to spawn at that point is not available

• unconscious_markers – option to create markers on all player’s maps (including JIP players) showing where the unconscious units are.

• unconscious camera – while the player is unconscious it switches to a camera that either (a) focuses on the unconscious player’s body or (b) follows the nearest friendly alive unit within 100 metres, with preference for players over AI.

• call_out function - causes the unconscious player to call out at random intervals (between 15 and 35 seconds) to help you find his body and revive him.  Can be used as an alternative to the unconscious markers for locating downed players or in addition for added immersion.

• revive timer option. This option allows mission makers to specify a revive time limit and if the time runs out the player respawns at base or is declared dead.  

• heal_yourself_option  Adds an action to the player to heal himself if damage is within a range specifiable by the mission maker (eg. damage 0.1 – 0.5).  The number of times this option is available per revive is also settable.  Designed to allow players to heal minor damage but to still rely on medics for more serious injuries.

• kegetys_spectator_script option for dead players to use kegetys script

• Players are revived with the weapons they died with.

• Can be set up easily for use with any side eg BLUFOR (default), OPFOR and RACS

• No addons needed but is compatible with other addons

Several other sub-options are present but read the notes in the zip file for more info on these.

Changes from previous version

• incorporated the heal_yourself function

• incorporated an option to use kegetys spectating script when dead

• ViperMaul’s fix for kegetys spectating script

• Updated the mission end function, now only creates the trigger if this function is used and uses “END6†to reduce the risk of incompatibility with user designed missions

• Option to make it possible to respawn at Base_1 even if enemy forces are within a 50 metre radius.

• incorporated new unconscious follow cam discussed a few posts back.

Implementation

Please read the latest implementation notes and init.sqf readme in the zip file before using the new scripts

Missions included

AI_disabled_revive_230707 - test mission and version of the script for BLUFOR forces

Bugs

If you do not get the joining mission message upon starting the mission then return to the unit selection screen and try again (I’ve only seen this a couple of times in many hours of testing so you may not ever experience it).

Occasionally when using the revive timer option a dead player’s body will disappear

There are potentially some problems with Kegetys script if you use this option but I've hopefully sorted most of them out.  For instance, if you are following a unit that is killed your view will change to the ocean and you’ll need to select the next unit in the view menu.  Also if using the mission_end_function players will get the message that the mission has failed but will not return to the debriefing screen until they press escape.  

Tested

On version 1.08 on both dedicated and local servers.  Works with JIP.

Thanks

Special thanks to HulkingUnicorn for his scripting advice, testing and many suggestions

Many thanks also to satexas69, MCPXXL, SNKMAN and sickboy for all their suggestions, advice and support and to all at the BIS forums

Based on concepts by PRiMe, toadlife and Mongoose_84.  Also thanks to Chris'OFP editor.

Some of the voice arrray stuff stolen with the permission of SNKMAN from ArmA Group Link II Plus!

And of course thanks to Kegetys for his amazing spectating script and to ViperMaul for his script fix

Good luck,

norrin smile_o.gif

Share this post


Link to post
Share on other sites

Woke up this morning and saw "Norrin's Revive AI-disabled script out of beta!" on the front page of Armaholic. You've just made my day wink_o.gif

Thanks Norrin, for all your hard work notworthy.gifyay.gif

Share this post


Link to post
Share on other sites

Sorry for a double post, and for the noob question, but how do you set the revive limit to infinite? 0 doesn't work for Max_respawns, so shall I just delete that line, or set it to something very high?

Share this post


Link to post
Share on other sites

Just set it to high number like 10000. Damn you've just made me think of another change I should make. smile_o.gif

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  

×