Rescue boat toodles off to find a downed pilot marooned on an island. Simple enuff?
Script to detect, from script in rescue boat addon, if the nearestvehicle/object/unit is derived from the man class. By using the following script <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
_boat = _this select 0
_timer = 200
_person = nearestObject getpos _boat
? ("man" counttype [_person] == 1 && _person distance _boat < 20) : goto "pickup"
_timer = _timer-1
_person assignAsCargo ***_Boat
_person moveincargo _Boat
_boat Sidechat "Passenger on board"
it only works when the boat has gone on shore and is on top of the rescuee. *** ***Not favourable enuff unfortunately. So any suggestions to detect the guy at a minimum radius from the rescue boat?
Oh and I have tried to figure this cos/sin mathematics thingee based upon the direction of the boat and its x,y positions, but it doesn't seem to gel in my old rain very well.
P.s. this is for the Police launch with the next fishing boat release.