kodansha 0 Posted November 4, 2005 a script exists in order not to make to drown who falls in sea, applicable to all the units ?? Thanks Share this post Link to post Share on other sites
Thunderbird 0 Posted November 5, 2005 Script of an unit floating once ejected Quote[/b] ]private ["_sensor"];_sensor = "EmptyDetector" createVehicle [0,0,0] _calcH = {private["_result"]; _sensor setpos [getpos _this select 0, getpos _this select 1, 0]; _result = getpos _sensor select 2; _result}; _pilot = _this select 0 #check @ ("plane" countType [vehicle _pilot] > 0) || ("helicopter" countType [vehicle _pilot] >0) _craft = vehicle _pilot @ !(vehicle _pilot == _craft) @ (getpos (_pilot) select 2 ) < -1.5 #loop ?abs(_pilot call _calcH) < 3: goto "water" ; ? ((getpos _this select 2) > -0.4) : goto "water" ? speed _pilot < 1: goto "pirla" goto "loop" #water ? (getdammage _pilot > 0.7): _pilot setdammage 0 @ (vehicle _pilot) == _pilot _boat = <span style='color:red'>"Raft"</span> createvehicle (getpos _pilot) _pilot moveindriver _boat @ (vehicle _pilot) == _pilot goto "check" #pirla goto "check" ps : replace the red part by something else that you'll define in the cpp. Regards TB84 Share this post Link to post Share on other sites
Placebo 29 Posted November 10, 2005 Sounds like this belongs in Mission Editing & Scripting Share this post Link to post Share on other sites