OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Hauk on 04 Jun 2004, 01:39:39
-
Hey everyone,
I just wrote an extraction script for my chopper and I am after incorporating snYpirs script, but when we all get in it justs sits there like a rock :-[
Here's the script
_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"
_chopper LockWP = false
#Continue
Please help if you can, I'm after spending 3 weeks trying to get this mission finished and i still have the outro to do, and the briefing and overview, so help would be much appreciated :D
Cheers,
Hauk
-
First of all, you have no delay in the for2 loop.
And, the chopper never stops the HOVER action as you don't have anything cancelling it...
And I think you can subtitute the whole check loop with this:
"_x in _chopper" count _playerArr == count _playerArr
Then use the @ or a short delayed loop to check that condition...
No syntaxes guaranteed of course... :P
-
thnks, hate r kint, i'll give it a shot :)
Hauk
-
Also take care that you don't mix up the reference to
your chopper, as seen in your script above:
_chopper / chopper
_chopper = a local reference to the chopper inside the script
chopper = may probably not the same vehicle as you have
been passing to the script
If you have named the chopper in the editor in the unit's menu
chopper it is ok, but if not, the lines according to chopper
will not work.
~S~ CD