Afternoon everybody,
I haven't posted in about a month and it feels good to be doing it again, but anyway, to the problem.
Right, what i have is a chopper that lands when i radio him and when all my men are aboard he is meant to go back to the airport on Malden.
First I'll give you the code so you can see what i'm talking about:
_chopper = _this select 0
_player = 1
_marker = 2
_pilot = 3
_airlift = 4
player sideChat "HOTEL ONE, DOURDAN IS CLEAR. REQUESTING AIRLIFT, OVER."
~3
chopper sideChat "ROGER THAT ALPHA. HOTEL INBOUND. ETA 10 SECONDS"
~3
chopper setBehaviour "SAFE"
chopper move getpos airlift
@airlift distance chopper < 400
_chopper LockWP true
chopper action ["HOVER", chopper]
#for1
~0.1
chopper land "GET IN"
_player = leader player
_playerArr = units group _player
_num = count _playerArr
_incount = 0
_tmp = 0
#for2
? vehicle (_playerArr select _tmp) == _chopper : _incount = _incount + 1
? _tmp < (_num - 1) : _tmp = _tmp + 1; goto "for2"
? _incount != _num : goto "for1"
? _incount == _num : goto "Continue"
#Continue
_chopper LockWP = false
chopper flyInHeight 100
chopper action ["CANCEL_HOVER", chopper]
chopper flyInHeight 60
chopper move getPos marker
@marker distance chopper < 65
chopper action ["HOVER", chopper]
chopper land "TRANSPORT UNLOAD"
~5
chopper flyInHeight 0.3
chopper action ["Engine Off", chopper]
exit
I've tried absolutely everything and am feeling lost.
If anybody has any input at all it would be much appreciated.
cheers,
Hauk
P.S. Poland is a cool country!!!