Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: SQF revive script (ACCEPTED)  (Read 27572 times)

0 Members and 5 Guests are viewing this topic.

170th

  • Guest
Re: SQF revive script
« Reply #15 on: 05 May 2007, 14:14:14 »
Ok, in coop mission i only play with human players and for me i dont need the ai to revive... but with the other probs better wait for patch. thanks anyway  greets sgt.ace

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script
« Reply #16 on: 05 May 2007, 15:38:21 »
Seeing I've already made the script I thought I'd post it just in case you wanted to use it until the "isKindOf" command is fixed.  In this version all playable AI can revive other units but only human players that are medics can revive.

You can get it here: Medic Revive Only script

A couple of guys over at the BI forums have discovered another bug and that is this script gives a scalar error if the playable Ai are disabled either in the briefing screen or the description.ext so make sure you don't do this.  I've also noticed that the forced end of mission if all human players are unconcious doesn't always trigger.  Any way let me know how it goes if you decide to use this version of the script.

 


170th

  • Guest
Re: SQF revive script
« Reply #17 on: 05 May 2007, 16:31:39 »
Great! When the AI enabled then it works perfect without the scalar bool... prob. But one error while playing on dedi:
« Last Edit: 05 May 2007, 16:51:38 by 170th »

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script
« Reply #18 on: 05 May 2007, 16:52:37 »
Haven't seen that error in a long time, is it a once off error or does it keep recurring, if does keep happening can you post a link to your mission so I can take a look at it.


# removed unnecessary quote - h-
« Last Edit: 05 May 2007, 17:28:29 by h- »

170th

  • Guest
Re: SQF revive script
« Reply #19 on: 05 May 2007, 17:07:26 »
It was in your mission  but we killed friendly ai. I think in a normal mission without killing friendlys it works.

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script
« Reply #20 on: 06 May 2007, 13:45:36 »
SQF_REVIVE for disabled AI

OK, I think I’ve got the disabled AI error sorted. 

Updated on 7th May 2007

These two versions (revive_player_AI_disabled.intro and revive_player_AI_disabled_medic.intro) of the script are only for use when playable AI is disabled on a dedicated server, if you are planning on using playable AI or a local server you’ll need to get the previous version of the script (ver 020507).

Changes
There's two additional scripts (“connected.sqf” and isplayer.sqf), a new trigger and quite a few changes to the existing scripts.

Additional notes for implementation
1. Just follow the same routine as for the previous version (ver 020507).
2. In addition you’ll also need to define the _unit array in the connected.sqf which you can find in the revive_sqf folder
3.  Finally you’ll need a new trigger placed in the editor

Activation: Game Logic – Repeatedly
Countdown: min 0 max 0 med 0
 Type: None
Condition: connected
On Act: call{[] execVM "revive_sqf\connected.sqf"};

The two scripts are available here:
All players can revive (ver revive_player_AI_disabled.intro)
and
Only players who are medics can revive (ver revive_player_AI_disabled_medic.intro)

Bugs
1. If you respawn, then quickly disconnect from the server (all within 2 seconds) you can cause a null variable error for all continuing players.  This is unlikely to happen in practice unless you really go out of your way to do it.
2. If you hit respawn while unconcious then you are transported to Respawn_west, if this happens disconnect and rejoin in the same slot and you will rejoin concious at the mission start point.

EDIT:  Updated both zip files which contain code optimisation and bug fixes
« Last Edit: 07 May 2007, 15:37:59 by norrin »

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script
« Reply #21 on: 18 May 2007, 06:49:23 »
Here's the links for the latest versions of the AI-enabled revive script

and AI-disabled revive script (with respawn counter and medic only version).

The zip files also contain notes for implementation of the scripts and example missions.

Changes
A respawn counter has been added to the AI disabled script (see notes in zip file for details) and a few minor changes to the AI-enabled scripts to ease their implementation and use with other sides.
« Last Edit: 29 May 2007, 02:52:58 by norrin »

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script
« Reply #22 on: 29 May 2007, 02:52:21 »
Here are the most recent versions (29th May 2007) of the AI-enabled revive script and AI-disabled revive script (with respawn counter).

Changes:
Several bug fixes including disappearing AI in the AI_enabled and some null variable errors in both.

EDIT:  Got bored last night and made a short vid of the AI_enabled script in action from different player perspectives you can see it here
« Last Edit: 30 May 2007, 04:29:19 by norrin »

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script
« Reply #23 on: 24 Jul 2007, 16:10:23 »
SQF Revive Script

AI_disabled revive script release version 1.0



Version 1.0 is available from here (23rd July 2007) :)

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

Latest version of the AI_enabled revive beta

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.

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.

In action
For a short vid of the AI_enabled script in action from different player perspectives click here

Offline Fmrfox

  • Members
  • *
Re: SQF revive script
« Reply #24 on: 26 Aug 2007, 00:25:34 »
Sorry to bump an old thread but I have tried to PM Norrin and it wont send for some reason, I don't understand why.

Norrin your revive script is absolutely amazing, thanks for making it! :)

I have a little problem though. I am using the BAS framework and 6th sense AI manager (which incorporates GL2) so I had some initial conflicts with the call out and spectator parts of your script. I seem to have resolved those by disabling the call out function and commenting out #include "spect\spectating.hpp". I don't have the AI disabled but I'm still getting the scalar error.

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script
« Reply #25 on: 30 Aug 2007, 05:01:16 »
Hi Fmrfox,

Sorry I haven't been checking this thread as often as I should recently.  Firstly there are new versions of the both the AI_enabled and AI disabled scripts available.

Get the latest version of the AI_disabled script here (230807)
 and the latetst version of the AI_enabled script here (290807).

The latest versions of these scripts contain new features and many bug fixes as well as updated implementation and init.sqf notes that will hopefully help you fix any problems you have encountered.  The AI_enabled script the most recently updated also contains notes on compatability fixes for other scripts.

All that being said, you may run into problems if you remove the revive spect folder and replace it with the Bas-f spect - it would be better to disable the spectate function through the BAS-f framework and implement it through the revive init.sqf options as I've made some minor changes to Kegetys' spectator script so that it functions with my revive script. 

I think the reason for the scalar error is that to use the AI_disabled script you must disable the playable AI in the description.ext.  If you want to have the playable AI enabled then you must use the AI_enabled script (see link in this post for latest version).

I'm going to be away for a couple of weeks and will not be able to check the internet so if its still not working send your mission to norrin@iprimus.com.au and I take a look at it when I get back (I'll be back on board around the 20th Sept). :)

norrin



# removed unnecessary quote - h-
« Last Edit: 30 Aug 2007, 17:45:22 by h- »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: SQF revive script (ACEPTED)
« Reply #26 on: 01 Sep 2007, 14:16:04 »
The script suite has been accepted and added to the ED Depot ArmA scripts section.

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: SQF revive script (ACEPTED)
« Reply #27 on: 20 Sep 2007, 17:22:06 »
The script suite has been accepted and added to the ED Depot ArmA scripts section.

Both AI_Disabled & AI_Enabled zipfiles at the depot contain the same stuff: AI_disabled script (AI_disabled_1g_230807b)  :blink:
Could you plz check & upload the AI_Enabled script?

Thx a lot!

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: SQF revive script (ACCEPTED)
« Reply #28 on: 20 Sep 2007, 17:49:45 »
Fixed.

Offline Seven

  • Members
  • *
  • Am I a llama?
Re: SQF revive script (ACCEPTED)
« Reply #29 on: 21 Sep 2007, 11:21:52 »
Script works nice! Thx a lot  :clap:

I do get an error though
ah noobishly forgot the gamelogic!
« Last Edit: 21 Sep 2007, 12:37:55 by Seven »