OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: nogreymatter on 24 Nov 2005, 06:11:20
-
Im using the ejecting from a Chinook script by the[]coyote, but I'm using it with a BAS MH47 instead of the default BIS Chinook. I have 11 members in my squad but for the last three the chut doesn't open, but when I use the BIS Chinook nothing goes wrong. Does anybody know why its doing this, and if so how do I fix it?
-
Post the script for us please.
-
Link it for you on the site, or type it up as seen in a script editor?
-
Either copy and paste it into your post, or (if it is big) attach it to your post. There is an option for this near the bottom after you click Reply.
-
_Group = _this select 0
_Vehicle = _this select 1
_listunits = units _Group
_A = 0
_B = count _listunits
#KEEPSENDING
_listunits select _A action ["EJECT", _vehicle]
Unassignvehicle (_listunits select _A)
_A=_A+1
~1
?_B >_A:goto "KEEPSENDING"
~1
MoveNext = TRUE
There is the script.
-
The script looks okay. You could try tghe following:
_Group = _this select 0
_Vehicle = _this select 1
_listunits = units _Group
_A = 0
_B = count _listunits
#KEEPSENDING
_listunits select _A action ["EJECT", vehicle (_listunits select _A)]
Unassignvehicle (_listunits select _A)
_A=_A+1
~1
?_B >_A:goto "KEEPSENDING"
~1
MoveNext = TRUE
But I suspect the problem is with the vehicle. Try it also with a slightly longer delay.
-
you could also call another script for each unit that checks if they're in a chute and if not makes one:
_unit = _this select 0
~3
?vehicle _unit != _unit:exit
_chute = "parachutewest" createvehicle (getpos _unit)
_unit moveindriver _chute
exitand call it right before incrementing _A
[(_listunits select _A)] exec "scriptname.sqs"
-
Alright thanks guys, will try it out.
-
check the last line of my post again, i had a typo ;D (the select _A part was missing)