Hello... it's me again
i'm trying to experiment w. a bit more realistic battle medical evacuation to wounded troops when they get hit.
Allso trying to add few actions to groups when their group members get wounded.
I guess thiss is a somekinda AI-improvement more wounds, less death -kinda thing... After long search i find out that people have done some workaround this, but i didn't find those actual scripts, or the scripts were far too difficult for me to modify.
I've done that with trigger launched "_x addeventhandler [""hit"",{_this exec ""woundsmonitor1.sqs""}]" foreach thislist
"hit" and "dammaged" eventhandlers are problematic, because they launch the script for every hit/dammage the unit gets.
"dammage-handler" is "man" friendly, but it cant find the shooter. Dammage amount can be find out, but i don't know how to use it, and how to find out which body part has been hit?
"hit" launches with all units, including vehicles and you can get/find the shooter w. (_this select 1), but not the amount of dammage to the unit that has been hit...
here is my idea, how it should work (i just cant edit this myself..
)
1. west trigger covering the whole map. detects repeatedly if any soldiers getdammage >=0.5, or addeventhandlers. Then the trigger activates the wounded soldier and his group, or nearest friendly unit(non group leader), to do some actions/scripts:
NOTE! The scripts should be able to check first @!(_wounded in vehicle), i mean any vehicles. I couldn't make it work.
wounded soldier:(if possible, script/trigger to check where the wounded soldier has been hit/dammaged: hands, legs, torso, head)
_ if hands hit, then unable to use his primary, and secondary weapons(assault riffle/mg, or LAW/RPG) only light handguns and then, exit the script.
_ if legs, torso, head hit, getdammage >0.5 then goto "HEAVYDAMMAGE"
#HEAVYDAMMAGE
_ remove alladdeventhanlers "hit" for not to launch it twice on the same guy.
_ dostop
_ setunitpos "DOWN"
_ report groupchat "i'm badly hit, can't move"
_ make his setcombatmode "BLUE" never fire
_ make him non threatening to enemy setCaptive true
_ get him twist and turn in pain, switchMove "LyingToTreatedLying";
_ after about few seconds ~0.3
_ get him loose consciousness switchMove "LyingDying";
_ (slowly bleed to death in 1-5min if not getting any treatment/medivac, or if medivac is not alive) this is not necessary... just maybe
_ if player wounded, same things but make a text appear on bottom screen "YOU ARE SERIOUSLY WOUNDED"
_ (if officer/leader group) wounded, then he cannot lead, if this is possible? Donno how to dodat.
if it's easier to handle the wounded soldier when he is join grpNull? Ok... but i'd like him to join back to his original group when he is get's back from the medivac trip and field hospital. I didn't manage do that? Null is very very Null...
Of course its easily done if you know the wounded soldiers original groups group name, but this function is intended to work when a lot of unknown/unnamed groups are on the map. It should all so work on the created and the respawned troops too w. no identity
There should be a marker on the map that is named fex: "Medivac_marker". That marker can be moved by the player(s) and put to a fex. 300m behind the supposed/expected enemy contact point or friendly units unloading area. Just a suggestion...
wounded soldiers group actions:_ dostop
_ get down
{_x disableAI "TARGET"} forEach units group this
_origroup setcombatmode "YELLOW"
_origroup setspeedmode "LIMITED"
_origroup setbehaviour "COMBAT"
_origroup setformation "LINE"
?!(alive _shooter) : exit or goto "GETWOUNDED"
_ dowatch _shooter/enemy who fired
_ dotarget _shooter and (leader command open fire w. whole group, if possible...)
_ check how many known enemy units (count enemy_units) are in the range 200m of the group (all so count resistance if resistance is enemy)
_ check how many known friendly units (count friendly_units) are in the range 200m of the group (all so count resistance if resistance is frienly)
_ if (enemy_units count is) > (friendly_units) then [_origroup, getdir _shooter, 50] exec "rush.sqs"
_ if (enemy_units count is) < (friendly_units) then [_origroup, -getdir _shooter, 50] exec "rush.sqs"
_ The rush.sqs should be modified so that the group cannot retreat under water. Secondly it should not wait for the wounded soldiers. Donno how to dodat...
Check the "rush.sqs" below...
_ count how many alive units are remaining in the wounded soldiers group
_ if count is > 1 - (leader _origroup) - (wounded) = minimum of 3 units, then
_ select one random soldier become the _helper for that wounded unit (ordered by his group leader if possible)
_ if there are several wounded soldiers, they all should have their own _helpers. I mean that the selected _helper cannot be selected again to carry two or more wounded men, when he is busy taking care of that first one.
_ if (alive leader _origroup) is the only one alive, then make the leader the _helper
_ if the wounded is the only one remaining alive, make nearest friendly soldier from another group, (not group leader) become the _helper
_ if only other groups group leaders are are alive, then select nearest group leader become the _helper
_ make the helper run to the wounded soldiers position, then
_ "attach" the wounded to the _helper
_ make the _helper "drag" the wounded to "medivac_marker" position.
_helper setcombatmode "GREEN" for the _helper to defend only
_helper setSpeedMode "FULL"
_helper setbehaviour "AWARE"
_ check if _helper under fire, then setunitpos "DOWN"
_ if _helper not under fire, then setunitpos "UP"
_ if the _helper gets "seriously wounded" or killed, select a new helper for the wounded soldier under the same rules above. Of course the wounded _helper would get a new _helper because his eventhandler is not removed... i think
_ if the _helper manages to get the wounded soldier to the (getpos _medivac_marker), then
_ make the _helper follow the group leader again.
*_oh yes. If there is not a "Medivac_marker" put to the map, or if there is not any suitable/available medivac vehicles *alive in the map. Then maybe the group should drag the wounded soldier along with the rest of the group. Then the *groups speedmode should be reduced to minimum. Maybe even stop and rest a few(20) seconds in every 50m... or *switch the carrying unit... just an idea
if it's easier to handle the _helper when he is join grpNull? Ok... but i'd like him to join back to his original group when he is get's back, carrying the wounded... I didn't manage do that? Again, Null is very very Null...
Medivac unit_ Maybe put a (marker named base_marker) in the editor map
_ put a Medivac unit (Empty chopper named Medivac) in the editor map. Not flying or engine on. Pilot and gunner waiting outside the chopper. (or camcreate it to the (_getpos base_marker) when wounded units apear on the map, during the mission)
_ Pilot and gunner not in the same group, because the gunner must be able to shoot he enemy, and pilot must obey script commands, without attacking any disturbing enemy units.
_ put two triggers that is "attached getpos setpos" to the "Medivac_marker position", so that if player moves the marker during the game, the triggers gets/moves to the markers position.
_One trigger grouped to Medivac chopper to count all of the wounded, and only the wounded units in 50m distance from the Medivac_marker... Donno if necessary?
_The other trigger counting or detecting any known enemy units distance medivac_marker < 400m. Donno if necessary?
then
_ call automatically the Medivac chopper to the Medivac_markers position
_ And make the choppe bysy, so that it cannot be ordered to perform other tasks, during medivac mission.
_ check if any known enemy tanks or MG:s units distance Medivac_marker < 400
_ if enemy tanks/AAguns too near, then chopper radio sidechat "LZ too hot, waiting to get clearence"
_ dostop medivac chopper, and wait untill no AA
_ check if just enemy infantry units distance Medivac_marker <200, then
_ radio sidechat "LZ hot, providing CAS"
_ make the Medivac chopper to move medivac_markers position, (_pilot set combatmode "CARELESS") and (_gunner setcombatmode "RED"), then
_ circle around the medivac_marker, counter clockwise direction, distance marker 180m, flyingHeight 80m, side gunner facing to the Medivac_marker
_ when safe, then _pilot land the chopper
_ pilot (or other group members) get out
_ count all of the wounded units near the Medivac_marker (trigger counting?)
_ get the _pilot or the crew members to the wounded soldiers position and "drag" them one by one near the chopper
_ count cargounits inside the Medivac chopper, when chopper full or when trigger area empty, then
_ move the _pilot/crew in and move to the base
_ if there are more wounded left in the Medivac_markers area, make the chopper return and do the same all over again.
_ if not busy, land and _pilot get out waiting.
_ if the medivac copper is not alive, is it possible to use any other nearest friendly vehicle that has available cargo seats?
here is the modified rush.script. (it works quite well...ish
)
;========================================================
; Rush.sqs v1.0
;
; By General Barron
; aw_barron@hotmail.com
; 8/11/04
;========================================================
;
; This script will cause the squad to execute a basic infantry maneuver: a
;squad rush. Part of the squad will run forward, while the rest of the squad lies
;down to cover them. Those rushing forward will lie down, and cover those
;behind them while they get up to rush, and so on.
; To stop the rush manually, set the group's formation to any formation other than
;"line". It is best to execute this script when the group is already in line formation, but
;that is not required.
;
;TO CALL THE SCRIPT:
; [group, direction, distance] exec {rush.sqs}
;In any init/activation field/script, where "group" is the name of the group to
;execute the rush and "direction" is the compass heading you want the rush
;to be oriented. "Distance" is the maximum distance in that direction the group
;will rush (in meters). If you only want to stop the formation manually, via script or trigger,
;simply place a number like "9999" in for distance.
;
;FOR A RETREAT:
; A retreat is basically the same as a rush, only instead of the units laying down facing in the
;direction of the rush, they face the opposite direction (to cover their buddies as they run away from
; the enemy). To call a retreat, instead of a rush, simply put a NEGATIVE DISTANCE in.
;IMPORTANT NOTE: The movement will still be in the direction given, even though the distance is negative!
;For example: [group1, 90, -100] exec "rush.sqs"
; Will execute a retreat that will go 100 meters east.
;
;NOTES FOR BEST RESULTS
; Think of this script as a replacement for a waypoint. Instead using a waypoint in the middle
;of a town to get the AI to attack, use this script: First move the AI close to the town via waypoints,
;then have the AI rush the remaining distance (a couple hundred meters or so) via this script.
;The result is a much more organized and realistic assualt.
; To prevent OFP's default AI from taking over the script, I suggest you use the "disableAI"
;command when you call this script. Use the following line right before you call the script:
; {_x disableAI "TARGET"} foreach units *group name*
; I also suggest that you use high-dispersion magazines in missions using this script.
;Due to OFP's lack of cover, lack of suppressive fire, and the AI's super-accuracy with weapons,
;rushes and retreats done by this script just aren't as effective as they are in real life.
;High-dispersion help balance these problems.
;========================================================
;-------------------------
#Group_Init
;-------------------------
? count _this == 4 : goto "Unit_Init"
; Error message if missing params
?count _this != 3 : hint "RUSH.SQS PARAMETER ERROR: EXITING SCRIPT"; exit
_group = _this select 0
_axis = _this select 1
_rushDist = _this select 2
{_x disableAI "TARGET"} foreach units _group
{_x allowFleeing 0.5} foreach units _group
; End any other rush/retreat scripts that are running.
;?formation _group == "LINE" : _group setformation "WEDGE"
;@formation _group == "WEDGE"
; formation = "line" indicates group is rushing
_group setFormation "LINE"
@formation _group == "LINE"
; Execute the script on each member of the group. Pass it three variables so it
; knows to jump to the right spot.
{ [_x,_axis,_rushDist,0] exec {rush.sqs} } foreach units _group
;-------------------------
; Define functions to be used in script. Global variable is used, since function only needs to be defined once for all instances of the script.
; Function used to find the distance a unit is from a line, designated by a position and a direction (i.e. line running to the left and right of a unit)
GENB_distFunction = {private ["_x1","_x2","_y1","_y2","_dir","_dist"]; _x1 = _this select 0; _y1 = _this select 1; _x2 = _this select 3; _y2 = _this select 4; _dir = ((_x2 - _x1) atan2 (_y2 - _y1)) + 90 - (_this select 2); _dist = (sqrt((_x2 - _x1)^2 + (_y2 - _y1)^2)) * sin _dir; _dist}
; Function used to find the average distance the squad members are from an imaginary line running left and right of where the leader stood at the beginning of the script
GENB_avgDistFunction = {private ["_xpos","_ypos","_axis","_units","_avgdist"]; _xpos = _this select 0; _ypos = _this select 1; _axis = _this select 2; _units = _this select 3; _avgdist = 0; { if (alive _x) then {_avgdist = _avgdist + ([_xpos,_ypos,_axis,getpos _x select 0, getpos _x select 1] call GENB_distFunction)} } foreach _units; if (({alive _x} count _units) != 0) then {_avgdist = _avgdist / ({alive _x} count _units)}; _avgdist}
;-------------------------
exit
;-------------------------
#Unit_Init
;-------------------------
_man = _this select 0
; Adding (almost always) prevents a harmless error from calling _distFunction on leader before he moves.
_xpos = ((getpos leader _man) select 0) + 1
_ypos = ((getpos leader _man) select 1) + 1
_axis = _this select 1
; maximum distance the group will rush forward, in meters. Script will exit once the group is about this far from their starting point, (or if formation is changed).
_rushDist = _this select 2
; maximum distance away from the center of the group a individual member can be. A maxDist of 20 means
; that the group will spread out a maximum of 40 meters from the front man to the rear man while rushing.
_maxDist = 10
; Set up behaviours for unit
_man setBehaviour "COMBAT"
_man setSpeedMode "LIMITED"
_man setUnitPos "DOWN"
if (_rushDist >= 0) then {_man dowatch [(getpos _man select 0) + 99999 * (sin _axis), (getpos _man select 1) + 99999 * (cos _axis)]; _man setCombatMode "YELLOW"; _retreatBonus = 0} else {_man dowatch [(getpos _man select 0) + -99999 * (sin _axis), (getpos _man select 1) + -99999 * (cos _axis)]; _man setCombatMode "GREEN"; _retreatBonus = 2}
_rushDist = abs(_rushDist)
; About a third of the squad will rush immediately, the rest will wait a short time.
? random 1 < 0.33 : goto "RUSH"
; @ is used instead of ~ so that if the formation is changed (to end the script), the script will end immediately (it will skip through all the delays).
_waitTill = _time + random 8
@(_time >= _waitTill) OR formation _man != "LINE"
;-------------------------
#RUSH
;-------------------------
;(2 + random 2)
; Get the unit up and start him running forward.
~5
_man setUnitPos "UP"
_man domove [(getpos _man select 0) + 100 * (sin _axis), (getpos _man select 1) + 100 * (cos _axis)]
_waitTill = _time + 3
@(_time >= _waitTill) OR formation _man != "LINE"
; If the unit is too far behind the rest of the squad, keep him running.
?alive _man AND (([_xpos,_ypos,_axis,getpos _man select 0, getpos _man select 1] call GENB_distFunction) - ([_xpos,_ypos,_axis,units _man] call GENB_avgDistFunction)) < (_maxDist * -1) : goto "RUSH"
; Get the unit down.
_man setUnitPos "DOWN"
_waitTill = _time + 3
@(_time >= _waitTill) OR formation _man != "LINE"
dostop _man
; Wait until the unit is too far forward of his group, this will make him wait until his squad (an average of their positions) has caught up within _maxDist of him.
@ !(alive _man) OR (([_xpos,_ypos,_axis,getpos _man select 0, getpos _man select 1] call GENB_distFunction) - ([_xpos,_ypos,_axis,units _man] call GENB_avgDistFunction)) < _maxDist OR formation _man != "LINE"
; Stay down for a short time, then repeat. Exit if the unit is dead or formation is set to anything other than "line".
_waitTill = _time + 5
@(_time >= _waitTill) OR formation _man != "LINE"
?alive _man AND (formation _man) == "LINE" AND ([_xpos,_ypos,_axis,units _man] call GENB_avgDistFunction) < _rushDist : goto "RUSH"
_man domove getpos _man
_man setunitpos "AUTO"
exit
Ok here are my crappy modification test scripts for that wounded soldier and medivac helicopter, that i'm working on...
; WoundScriptMonitor.sqs by Kammak;
; rush.sqs by kammak;
; Tweaked for pexmo (untested!) by ACF;
; slight modification and combination by MakkaraTheMan[FIN];
_guy = _this select 0;
_shooter = _this select 1
_orgroup = units _guy;
_origrop = group this
_enemy = east_units
_Mediheli = Mediheli;
_Medivac = Medivac
_Reinforce = Reinforce;
_cargo = (crew _Mediheli) - [Driver _Mediheli, Gunner _Mediheli];
_aunits = _cargo;
_j = (count _aunits);
_i = 0
_pilot = [driver _Mediheli];
_gunner = [Gunner _Mediheli];
#START;
?!(alive _guy) : exit
;@!(_guy in Vehicle)
;@(vehicle _guy) != _guy
?!(alive _shooter) : goto "GETDAMMAGE"
{_x disableAI "TARGET"} forEach units group this
_origroup setcombatmode "YELLOW"
_origroup setspeedmode "LIMITED"
_origroup setbehaviour "COMBAT"
_origroup setformation "LINE"
~5.0
[_origroup, -getdir _shooter, 50] exec "rush.sqs"
#GETDAMMAGE
?(getdammage _guy >= 0.5): goto "HEAVYDAMMAGE"
?(getdammage _guy <= 0.5): goto "EXIT"
;?(getdammage _guy <= 0.75): goto "MEDIUM"
#MEDIUM
_guy removeAllEventHandlers "hit"
;_guy disableAI "MOVE"
dostop _guy
_guy setunitpos "DOWN"
_guy setcombatmode "GREEN"
goto "MEDIVAC"
#HEAVYDAMMAGE
_guy removeAllEventHandlers "dammaged"
_guy removeAllEventHandlers "hit"
;[_guy] Join GrpNull;
_guy SetCaptive true;
_guy globalchat "null";
#SELECTHELPER
~0.1
;_h=(count _origroup)-(_guy)
;_h=_h+1
;_helper = (_origroup select _h)
_helper = (_orgroup select 1)
;[_helper] Join GrpNull
_helper SetCaptive true;
;? !(canStand _helper) or !(alive _helper) : goto "SELECTHELPER"
_guy globalchat "heavy";
_guy setunitpos "DOWN";
_guy setcombatmode "BLUE";
~2.0
_guy switchMove "LyingToTreatedLying";
_guy sidechat "I'M BADLY HIT... I Can't move...";
_guy switchMove "LyingDying";
_guy globalchat "tajupois";
_helper domove getpos _guy
_helper setcombatmode "BLUE";
~2.0
_guy setcombatmode "BLUE";
_helper sidechat "ROGER, MOVING OUT TO THE WOUNDED";
;@(unitReady _helper)
_pos3 = [_guy, 1.5, (getDir _guy)] call getRelPos
_helper domove _pos3
;@(unitReady _helper)
_helper setPos _pos3
_helper setSpeedMode "FULL"
_helper setbehaviour "AWARE"
_helper setDir (getDir _guy)
~1.0
_helper switchMove "FXFromKneel"
~1.0
_helper domove getmarkerpos "Medivac_marker"
#CARRY_LOOP
? !(canStand _helper) or !(alive _helper) : goto "SELECTHELPER"
_pos1 = [_helper, 1.5, (getDir _helper)-180] call getRelPos
_guy setPos [(_pos1 select 0), (_pos1 select 1), 0]
_guy setDir (getDir _helper)
#NEXT3
~0.2
? !(unitReady _helper) : goto "CARRY_LOOP"
[_helper] join (_orgroup select _i)
_helper setunitpos "AUTO"
_helper setcombatmode "AUTO"
_helper setbehaviour "AWARE"
_helper SetCaptive false;
#MEDIVAC
;@ ((_enemy distance _guy) < 200)
@(unitReady Pilotmediheli)
_guy globalchat "pilotti on valmis";
~1.0
@!(Pilotmediheli in _Mediheli)
_guy globalchat "pilotti ei ole sisällä";
~1.0
@(speed _Mediheli <= 1);
_guy globalchat "nopeus ok";
~1.0
@(getpos _Mediheli select 2) <= 1
_guy globalchat "korkeus ok";
~1.0
@(_Mediheli Distance Base < 100);
_guy globalchat "etäisyys ok";
~1.0
@(speed _Mediheli <= 1);
_guy globalchat "nopeus ok";
~1.0
@(getpos _Mediheli select 2) <= 1
_guy globalchat "korkeus ok";
~1.0
@(unitReady Pilotmediheli)
_guy globalchat "pilotti on valmis";
~1.0
@!(Pilotmediheli in _Mediheli)
_guy globalchat "pilotti ei ole sisällä";
~15.0
_guy globalchat "kutsuu mediheliä";
[_guy] exec "Medivac.sqs"
#EXIT
exit
And here are the rest of the crappy test scripts for medivacs:
Medivac.sqs
_guy = _this select 0
_orgroup = group this
_Mediheli = Mediheli
_enemy = east_units
_jsp = getmarkerpos "Medivac_marker"
_Reinforce = Reinforce
_cargo = (crew _Mediheli) - [Gunner _Mediheli]
_aunits = _cargo
_j = (count _aunits)
_i = 0
_pilot = [driver _Mediheli]
_gunner = [Gunner _Mediheli]
#START
?!(alive _guy) exit
?!(alive _Mediheli) exit
Pilotmediheli MoveInDriver _Mediheli
Pilotmediheli setcombatmode "BLUE"
Pilotmediheli setbehaviour "CARELESS"
~0.5
gunnermediheli MoveInGunner _Mediheli
gunnermediheli setcombatmode "RED"
~1.0
_guy setunitpos "AUTO"
_guy globalchat "5"
@(speed _Mediheli <= 1)
_Mediheli setfuel 1
_Mediheli setcaptive true
_Mediheli flyinheight 50
Pilotmediheli domove getpos _guy
Pilotmediheli sidechat "MEDIVAC ON THE WAY"
@(unitReady Pilotmediheli)
Pilotmediheli domove getpos _guy
;@(_Mediheli Distance getpos _guy < 500)
@ ((Pilotmediheli distance _guy) < 500)
_hloc = "HeliH" createvehicle getpos _guy
_Mediheli flyinheight 15
Pilotmediheli sidechat format ["MEDIVAC LANDING 1%", getpos _guy]
~1.0
@(unitReady Pilotmediheli)
~5.0
Pilotmediheli domove getpos _guy
~1.0
_Mediheli land "LAND"
@(unitReady Pilotmediheli)
unassignvehicle Pilotmediheli
@(unitReady Pilotmediheli)
@!(Pilotmediheli in _Mediheli)
Pilotmediheli setbehaviour "AWARE"
Pilotmediheli setunitpos "UP"
Pilotmediheli domove getpos _guy
#CARRY_MAIN
@(unitReady Pilotmediheli)
@ ((Pilotmediheli distance _guy) < 50)
_pos3 = [_guy, 1.5, (getDir _guy)] call getRelPos
Pilotmediheli domove _pos3
@(unitReady Pilotmediheli)
? !(canStand Pilotmediheli) : goto "EXIT"
?!(alive Pilotmediheli) : : goto "EXIT"
Pilotmediheli setPos _pos3
Pilotmediheli setSpeedMode "FULL"
Pilotmediheli setDir (getDir _guy)
~1.0
Pilotmediheli switchMove "FXFromKneel"
~1.0
Pilotmediheli domove getpos _Mediheli
#CARRY_LOOP
? !(canStand Pilotmediheli) : goto "STOP"
?(_Mediheli Distance _guy < 7) then (_guy MoveInCargo _Mediheli)
_pos1 = [Pilotmediheli, 1.5, (getDir Pilotmediheli)-180] call getRelPos
_guy setPos [(_pos1 select 0), (_pos1 select 1), 0.02]
_guy setDir (getDir Pilotmediheli)
#NEXT3
~0.2
? !(unitReady Pilotmediheli) : goto "CARRY_LOOP"
;_guy assignascargo _Mediheli
_guy MoveInCargo _Mediheli
? (count _aunits >10) : goto "MOVEON"
@(unitReady Pilotmediheli)
#MOVEON
@(unitReady Pilotmediheli)
~1.0
deletevehicle _hloc
~1.0
Pilotmediheli setbehaviour "CARELESS"
Pilotmediheli assignasDriver _Mediheli
Pilotmediheli MoveInDriver _Mediheli
Pilotmediheli sidechat "MEDIVAC RETURNING TO BASE ...OVER"
~1.0
_Mediheli move getpos Base
_Mediheli flyinheight 50
@(unitReady Pilotmediheli)
@(_Mediheli Distance Base < 300)
_Mediheli land "GET OUT"
@(unitReady Pilotmediheli)
_Mediheli land "LAND"
~5.0
@(speed _Mediheli <= 1)
~1.0
@(getpos _Mediheli select 2) <= 1
#GETOUTHELI
unassignvehicle _guy
~1.0
unassignvehicle _guy
_guy action ["EJECT", _Mediheli]
@!(_guy in _Mediheli)
_guy domove getpos Field_hospital
Pilotmediheli sidechat "Medivac complete"
unassignvehicle Pilotmediheli
Pilotmediheli action ["EJECT", _Mediheli];
@!(Pilotmediheli in _Mediheli)
Pilotmediheli globalchat "Medihelin pilotti ulkona"
~1.0
@(unitReady Pilotmediheli)
Pilotmediheli globalchat "Medihelin pilotti valmis"
~1.0
@(unitReady Pilotreinforce);
Pilotreinforce globalchat "reinforce valmis"
~1.0
@!(Pilotreinforce in _Reinforce);
Pilotreinforce globalchat "reinforce pilotti ulkona"
~1.0
@(speed _Reinforce <= 1)
Pilotreinforce globalchat "reinforce nopeus ok"
~1.0
@(getpos _Reinforce select 2) <= 1
Pilotreinforce globalchat "reinforce korkeus ok"
~1.0
@(_Reinforce Distance Base2 < 100)
Pilotreinforce globalchat "reinforce etäisyys ok"
~1.0
@(speed _Reinforce <= 1)
Pilotreinforce globalchat "reinforce nopeus ok"
~1.0
@(getpos _Reinforce select 2) <= 1
Pilotreinforce globalchat "reinforce korkeus ok"
~1.0
@(unitReady Pilotreinforce);
Pilotreinforce globalchat "reinforce valmis"
~1.0
@!(Pilotreinforce in _Reinforce);
Pilotreinforce globalchat "reinforce pilotti ulkona"
[_guy] exec "Reinforce.sqs"
#EXIT
exit
getRelPos.sqf
// getRelPos.sqf
// AliMag - 02/2003
// return relative position from _obj using distance and direction
private ["_obj","_dis","_posX","_posY","_dir","_pos"];
_obj = _this select 0;
_dis = _this select 1;
_dir = _this select 2;
_posX = getPos _obj select 0;
_posY = getPos _obj select 1;
_pos = [_posX + ((sin _dir) * _dis), _posY + ((cos _dir) * _dis), 0];
_pos
init.sqs
;**********************
; init.sqs *
; paraMedic test *
; AliMag - 03/2003 *
;**********************
getRelPos = preprocessFile "getRelPos.sqf"
hint "This is automatic west medivac script for all units in the -dammaged- or -hit- triggers area.
\ It is a modification from the original paramedic script.
\ Wound some of the friendly units in the area, and wait for the medivac to arrive.
\ I recommend that you use the time acceleration 2.00
\ Get in the medivac choppers cargo and follow the units to the base.
\ It works quite well, but it is not perfect...
\ Best regards By Noobie MakkaraTheMan... :D"
exit
In the attachment files is my sorryassversion of the medivacfunction. It kinda works, but there is too much conditions missing for it to be any use. It sucks very much...
The other attachment file is an example for the coppers to circle around for CAS
If you have the pations to see it trough, you'll see what i'm after.
Huh this is quite long request... sorry i gues i got a little carried away, but never say never...