Home   Help Search Login Register  

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

0 Members and 1 Guest are viewing this topic.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: SQF revive script (ACCEPTED)
« Reply #45 on: 03 Jan 2009, 06:48:48 »
Well I am not designing my mission to be compatible with a beta version... if at some point patch 1.15 becomes the real deal then I will but I will be building my missions in 1.14.

Also, the dead body in 1.14 always disapears. The gear can remain though, that is the option you might be getting confused with?
TS3 IP: tor.zebgames.com:9992

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script (ACCEPTED)
« Reply #46 on: 04 Jan 2009, 11:31:29 »
Sorry guys only got back from a couple of weeks holiday and back online today. 

@Garcia do you still need help or are you after Hulk's revive script?  As far as I can understand a lot if not all of what you are asking is possible with the AI_enabled revive script.

@ hoz - I've only just checked the test mission with the AI_enabled revive and as far as I can tell it seems to be working fine with ArmA ver 1.15 when units are revived ie. the unconscious body is removed and replaced with the player's body doing the unconscious animation prior to the player regaining control of his avatar.   If you are still running into probs can you email me your mission or send me a picture of the problem and I will try and replicate and fix it - thanks mate.

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re: SQF revive script (ACCEPTED)
« Reply #47 on: 04 Jan 2009, 15:03:30 »
Hmm, that might be...I just went for the one without AI because I don't want them :whistle: But seeing that I want to control what happens once a player disconnects and leaves an AI behind, I guess I could just use the one with AI enabled ;)

Offline desrat

  • Members
  • *
Re: SQF revive script (ACCEPTED)
« Reply #48 on: 19 Jan 2009, 02:14:01 »
sorry if this is a n00b question but how would I go about re-enabling the contents of a unit's init line when it gets respawned/revived currently once the unit respawns/revives it loses the function assigned to it..

BTW Im using AI-Enabled if that makes a difference.

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script (ACCEPTED)
« Reply #49 on: 19 Jan 2009, 13:03:42 »
You could run a separate script through the unit's init line which you would call like this:
Code: [Select]
nul = [unitseditorname] execVM "initline.sqf";
Then make a new script called initline.sqf in your mission folder and put this in the script:
Code: [Select]

//initline.sqf

_unit = _this select 0;
_name = call compile format["%1",_unit];

if(!local _name) exitWith {};


while {true} do
{
waitUntil {!alive _name};
waitUntil{alive call compile format["%1",_unit]};
_name = call compile format["%1",_unit];
_name setVehicleInit "your init line code";
processInitCommands;
sleep 1;
};

Just put your init line code in the setVehicleInit line and barring any syntax errors this should work.

EDIT: Changed code to call script as I accidentally used nil rather than nul.



« Last Edit: 20 Jan 2009, 00:01:33 by norrin »

Offline desrat

  • Members
  • *
Re: SQF revive script (ACCEPTED)
« Reply #50 on: 20 Jan 2009, 11:48:59 »
thx norrin I'll give it a try at the weekend won't have time till then

**EDIT**
Actually decided to take the day off work (naughty me :)) so tryed it out with an error on line 15 specifically the following

Code: [Select]
_name setVehicleInit "nul = [BLU_1Plt_RF1, "Mobile1"] spawn compile preprocessFileLineNumbers "setPosMarker.sqf"";
unit init line as follows at mission start
Code: [Select]
GrpBLU_1Plt_PltHQ = group this; nul = ["rifleman",this] execVM "f\common\@ShackTac_assignGear.sqf";nul = [BLU_1Plt_RF1] execVM "initline.sqf";
« Last Edit: 20 Jan 2009, 12:46:31 by desrat »

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script (ACCEPTED)
« Reply #51 on: 20 Jan 2009, 23:30:08 »
First off, I've checked the initline.sqf script and its working fine.  The problem you are running into, I think, is a syntax error.  If you are surrounding code with "" then any code that requires "" within this statement must use double "" "" or you can use '' instead, as each ' is the same as "".

So your code in the initline script needs to look like this:
Code: [Select]
_name setVehicleInit "nul = [BLU_1Plt_RF1, 'Mobile1'] spawn compile preprocessFileLineNumbers 'setPosMarker.sqf'";

Offline desrat

  • Members
  • *
Re: SQF revive script (ACCEPTED)
« Reply #52 on: 22 Jan 2009, 00:33:32 »
ok got it :)

All working as necsassary, and if case anyone was wondering what I was actually trying to achieve here it's basically to attach markers to my squad leaders so they can be used as mobile spawn points in the revive scripts..however once the unit died the marker stoped updating..

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script (ACCEPTED)
« Reply #53 on: 22 Feb 2009, 11:24:55 »
AI_enabled Revive Update 0.61 beta

See the first post in the thread for latest version of the script.

Changes in 0.61
•   Script optimisations- Removed a great deal of unnecessary code from the core revive_player script and introduced a number of pre-processed functions to reduce the CPU overhead of the scripts.

•   Call for help option - When enabled allows an unconscious player to call for help from surrounding AI and players by pushing a button or the "H" key while unconscious.  Called AI will automatically move to the downed player unless they are already helping someone else.  Players will receive a hint that another player is calling for help.  This system works great if the automatic AI goto revive option is disabled as the group leader (the player) can specify when his AI should move to and heal a downed player (rather than them trying to heal someone in the middle of a fire fight), then if he is shot himself he can call for help.

•   Toggle dialog fade- Another new button in the unconscious dialog or the "B" key allows you to turn off the annoying dialog fade during the unconscious camera. The default setting is dialog fade off.

•   Other improvements to the unconscious camera - The camera no longer resets to the player's 3rd person view when a new dialog appears.  Automatically uses respwn point names when respawning at base rather than eg "base 1"

•   New information in unconscious camera- In connection with the other new features a lot more information is now displayed while units are unconscious such as who the current reviver is and there distance from the unconscious player, list of units that have been notified that you need help etc.

•   Free camera- Thanks to some code kindly provided by OFPEC (thankyou Hoz and Mandoble) there's now a free camera mode attached to the follow/free camera option - depress the right mouse button to move the camera and the mouse wheel zooms in and out.

Many thanks to Hoz at OFPEC for his testing of the latest versions and his many suggestions and improvements to both the script and readMe file.

Finally, check the last page of the readMe for some tips on enabling these scripts with ACE.

EDIT: I've added a new version of the AI_enabled revive (0.61e) to the first post in the thread, no major changes just a slight change in the timing of the scripts to reduce the risk of spawning at respawn west when you fall unconscious (26/02/09).
« Last Edit: 25 Feb 2009, 23:26:24 by norrin »

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: SQF revive script (ACCEPTED)
« Reply #54 on: 26 Feb 2009, 05:36:54 »
I updated the OFPEC resource for ya.  :good:
Xbox Rocks

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script (ACCEPTED)
« Reply #55 on: 26 Feb 2009, 05:57:06 »
OFPEC AI_enabled Revive Tutorial

Ok then, without further ado, and with copius thanks to hoz for making this possible, I give you the OFPEC AI Enabled Revive Tutorial.

You can find it here   

This tutorial describes the various features and functions available in the script in detail and provides a step by step guide on setting-up and configuring the latest (0.61 version) of the AI _enabled revive scripts.
« Last Edit: 01 Mar 2009, 14:53:57 by hoz »

Offline desrat

  • Members
  • *
Re: SQF revive script (ACCEPTED)
« Reply #56 on: 01 Mar 2009, 12:04:08 »
that link just goes to the FAQ for me..

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: SQF revive script (ACCEPTED)
« Reply #57 on: 01 Mar 2009, 14:54:14 »
fixed  :whistle:
Xbox Rocks

Offline fleepee

  • Members
  • *
  • Enter the Matrix!
Re: SQF revive script (ACCEPTED)
« Reply #58 on: 09 Mar 2009, 21:38:51 »
I found those errors, with a mission with independant side players, but I don't know in which script it is...
« Last Edit: 09 Mar 2009, 21:46:38 by fleepee »

Offline norrin

  • Tutorial Writer
  • **
Re: SQF revive script (ACCEPTED)
« Reply #59 on: 10 Mar 2009, 01:27:08 »
Hi mate,

The problems are in the cam_follow.sqf and the LeaderFix.sqf, would you mind sending me your mission and links to any addons you've used to norrin@iinet.net.au so I can check your mission set-up and to see whether the 2 problems are related.

Thanks mate,

norrin