Hello,
I downloaded the new addon the NH-90 by ACAT and one of their scripts is to allow for a pilot to after ejecting over water to have a inflatable raft appear under them as so they dont die. There were multiple errors found in the script that some I have been able to change and others I need help with so im turning to you all.
1. Fixed-Not all pilots in multiplayer would get the dingy...by putting a delay in the begining it allowed for each person to load script and is working now.
2. NOT FIXED- The help me says to put this line to call script from addon inside the pilots init.
[this] exec "acat_nh90d\scripts\dingy_load.sqs"
I checked the line and it is directed to correct spot. (did this by unbpoing the addon) but when mission loads it says it cant find it. So i removed it from addon and placed in mission.sqm folder and that works...any ideas as to get it to run from addon?
3. Fixed -After the Pilot uses the dingy once you no longer get a dingy. Would like to see multiple uses. Changed Script to loop
4. Fixed- After you die and respawn as same player in marker area you dont have script any more. Would like to fix this also.
Here is the script as its written and any ideas are appreciated.
_________________________________________________________
#Start
_unit = _this select 0
~10
?! (local player) : exit
~3
#sencechute
~0.5
? (player distance (nearestObject [player, "ParachuteWest"]) < 12) : goto "armed"
? (player distance (nearestObject [player, "ParachuteC"]) < 12) : goto "armed"
? (player distance (nearestObject [player, "ParachuteEast"]) < 12) : goto "armed"
? (player distance (nearestObject [player, "ParachuteG"]) < 12) : goto "armed"
?! (alive player) : goto "Start"
goto "sencechute"
#armed
player say "acat_beep"
#waitforlanding
? ((getpos player select 2 <= 0) and (vehicle player) == player) : goto "landed"
?! (alive player) : goto "Start"
~0.2
goto "waitforlanding"
#landed
~0.5
? (getpos player select 2 < -1 ) : goto "make"
player say "acat_beep" ; goto "Start"
#make
_dingy = "ACAT_PilotLifeBoat" createvehicle getpos player
_dingy say "dingy_inflate"
#getindingy
~0.02
player moveindriver _dingy
;player globalchat format ["movein %1",_dingy]
?! (player in _dingy) : goto "getindingy"
;hint format ["Dingyscript waiting for resque after creating (%1)",_dingy]
#waitforresque
_resquevehicles = ["NH90_vehicable"]
_next = 0
#findnearest
~2
_check = (_resquevehicles select _next)
_rveh = nearestobject [_dingy,_check]
;player globalchat format ["%1 distance %2",_rveh,_rveh distance _dingy]
? isNull _rveh : goto "none"
?! alive _rveh : goto "none"
?! (alive player) : goto "end"
? _rveh distance _dingy < 5 : goto "getin"
#none
_next = _next + 1
? _next == (count _resquevehicles) : _next = 0
?! (alive player) : goto "end"
?! (locked _dingy) : _dingy lock true
goto "findnearest"
#getin
? (locked _dingy) : _dingy lock false
?! (player in _dingy) : player moveindriver _rveh
? player in _rveh : goto "end"
~ 0.2
goto "getin"
#end
DeleteVehicle _dingy
goto "Start"
______________________________________________________
You can get the addon here:
ftp://www.gamezone.cz:8021/ofpd/unofaddons2/acat_serval.zip