Menu
So....
OFP
B17 II
Links
Other
On-line
E-mail

Use this scripting in your missions - allows teammate reviving


ReviveRespawn v1.57  -  UPDATE
 
Original by Doolittle
Modified by PRiME
Some code by Gnat

Dowload it HERE



Features
    -: Vehicle Spectate works now
    -: No longer need to press esc to update player list (live players are in white)
    -: AI will getout of a vehicle to revive you, thought this might not work if the AI unit is server side controled.
    -: When pressing ESC it will show a MAP screen and focus on your body location (in GREEN) for 12seconds
    -: AI will return to formation after reviving someone.
    -: You will be told which player (ai) revived you. (only players get this message localy)
    -: Non existing unit check in init.sqs
    -: All adjustments now possible in init.sqs, editing of other files should not be needed
    -: Death over water can result in body being moved to nearest land (anti-water).



TUTORIAL
  
v1.1

How to use it in your OFP Missions - EDITOR

1.   PlayerAlive
Playeralive trigger, this is the core trigger and must not be named anything other then "playeralive". This trigger can be set to the correct side but for this example we only want it to see WEST units so set it up as below.
Now place this trigger over the mission area and make sure its far away from the respawn_marker (see below).


2.   Respawn
Units respawn is simply the respawn_west or respawn_east or respawn_civilian or respawn_GUERRILA, these are the MARKER names of each sides if you wish to use this revive respawn method.

Placing the respawn marker is simple, just select MARKER in the editor and double click were you wish the units to temp respawn to (the units/player will not be interacting at this location), once done select empty as the icon/marker type then in the name field put in the name respawn_(side) so for this example it will be respawn_west, now press OK and thats it!.
Important
Make sure the respawn marker is placed far from/outside of the "playeralive" trigger. Recommended that it be placed on a remote island.


 

3.   Unit Setup
Each playable unit that you want ReviveRespawn to work on must have a NAME assigned. In the example mission the west units are named S1 through to S12

4.   Deathmarkers & Deathtriggers
The deathmarkers & deathtriggers, these are the next important part to the revive process.
The deathtriggers determine when a unit has died, you must make a trigger for EACH unit. Example below.


The next part is the deathmarkers, this is much like placing a respawn_marker but insted of calling it "respawn_(side)" we are gonna call it the same name as one of the units, in this case "S1", each unit you have placed with a name and revivetrigger will need a marker with the same name. Be sure to set the marker to empty and pick a color of your choosing. Example below.

5.   Gamelogice
Don't forget to place the GAMELOGIC trigger on the map, called "Server". No other trigger parameters need be ajusted for this trigger.


 

How to use it in your OFP Missions - SCRIPTS

To enable ReviveRespawn in your mission copy the follow files into your mission direcory;
    AICONTROL.SQS
    CAM.SQS
    NEXTCAM.SQS
    RESPAWN.SQS
    RESPAWNDIA1.SQS
    RESPAWNDIA2.SQS


Only parts of the text supplied in the example INIT.SQS and DESCRIPTION.EXT need to be pasted to YOUR init.sqs and Description.ext

6
.   INIT.SQS
Depending on the content of your init.sqs (if you have one already) you will likely need all but the first couple of lines in the file. If you don't already have an init.sqs, use this supplied one.
Depending on the number and names assigned to your player units, you will need to modify the following line;

ReviveList = ["S1","S2","S3","S4","S5","S6","S7","S8","S9","S10","S11","S12"]

Change the "S#" to match whatever you have named your units.

Same applies to lines;

respawnS1 = 0
respawnS2 = 0
respawnS3 = 0
respawnS4 = 0
respawnS5 = 0
.......... etc etc

Ensure the word "respawn" is placed infront of all your player names for this section.

Other lines that can be changed but need not;

Deathmap = 1                 ;0 or 1 for MAP appearing when ESC is pressed when you are dead
CustomControl = 12      ;Time in seconds that is used when ESC is pressed when you are dead


7.  
DESCRIPTION.EXT
All text in Description.ext needs to be in your file of the same name, if you do not have one, use the supplied example as is.
Otherwise all sections from have to be included into your Description.ext but ensure that all CLASS and DEFINE declarations are not already defined in yours. Any double-ups will likely case errors.
Change the mission startup screen message;

onloadmission = "ReviveRespawnV1.57"

to suit your mission.

NOTE: If you have been using an old version of this Revive/Respawn you will have to change it. The main differences are that Classes RscReviveTITLE and DlgReviveDisplay have been added. 


How to use it in your OFP Missions - OPERATING

8
.   WORKING
Obviously upon running your mission you should receive no error messages and once a player is killed a "Death Blanket" should appear near to where they died.

Two things can happen at this point, after a short delay one or more of the nearby, same team, AI will attempt to move to blanket location, or another human player will move to the blanket (if they choose !).
If either a same side and/or same team AI or player stands for a short time close by (~ 3 meters), the dead AI/player will be revived (blanket disappears, body appears) and after another short delay the revived AI/player will have full control again.
If you are the dead player you will see a screen similar to the top-most picture on this web page. This page can be used to either look at your environment near to your body or spectate on other AI or players who may still be alive.
Pressing ESC while you are dead with bring up the Map breifly so as you may be able to determine where your body lays. Upon the Map being removed the spectate feature will return your view to your Death Blanket.
There is no Seagull feature in this scripting, pressing ESC more than once will either exit you from your game or bring up the game exit menus.
AI in vehicles can also revive players/AI. They can do this but either staying in or leaving the vehicle. AI players will drive nearby and leave a vehicle in an attempt to revive others.

9.   OTHER STUFF

ANTI-WATER
:
If for any reason you are having trouble with the anti-water feature then there is one extra parameter that can be adjusted.
In RESPAWN.SQS there is;

_HLimit = 2.4

This is the Height tolerance in meters for the detection of a "Death Blanket" being on water. This tolerance is required because of OFP's constantly moving water and is in part the reason why sometime "Death Blankets" will still appear in the water.
Increasing or decreasing this number MAY help but can cause unwanted "Blanket shifting" on low laying land like beaches or reduced "on water" detection ability.

LANGUAGE:
Sorry, haven't put any effort into making this work with all typical OFP implemeted languages (other than english !) ...... maybe soon.

Thanks to PRiME for his original tutorial material.

What further info or want to ask some questions?
Try these locations;
IPGN Forum
or maybe
BI Official Forums

Best of luck,
Gnat

Last Update: 5 Feb 2005

 

My Computer

P4 2.4GHz
MSI 845PE-Max3-FISR
512MB
80GB ATA133
128MB Ti4200