OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: nogreymatter on 24 Nov 2005, 06:11:20

Title: Parachut
Post 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?
Title: Re:Parachut
Post by: The-Architect on 25 Nov 2005, 08:46:32
Post the script for us please.
Title: Re:Parachut
Post by: nogreymatter on 25 Nov 2005, 19:02:27
Link it for you on the site, or type it up as seen in a script editor?
Title: Re:Parachut
Post by: macguba on 25 Nov 2005, 22:51:56
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.
Title: Re:Parachut
Post by: nogreymatter on 29 Nov 2005, 23:09:17
_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.
Title: Re:Parachut
Post by: THobson on 30 Nov 2005, 00:06:56
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.
Title: Re:Parachut
Post by: Triggerhappy on 30 Nov 2005, 00:51:56
you could also call another script for each unit that checks if they're in a chute and if not makes one:

Code: [Select]
_unit = _this select 0
~3
?vehicle _unit != _unit:exit
_chute = "parachutewest" createvehicle (getpos _unit)
_unit moveindriver _chute
exit
and call it right before incrementing _A
[(_listunits select _A)] exec "scriptname.sqs"
Title: Re:Parachut
Post by: nogreymatter on 02 Dec 2005, 23:44:48
Alright thanks guys, will try it out.
Title: Re:Parachut
Post by: Triggerhappy on 03 Dec 2005, 01:00:32
check the last line of my post again, i had a typo  ;D (the select _A part was missing)