Home   Help Search Login Register  

Author Topic: Secure parachuting possible? (Parachute bug?)  (Read 1234 times)

0 Members and 4 Guests are viewing this topic.

chig

  • Guest
Secure parachuting possible? (Parachute bug?)
« on: 16 Jul 2004, 23:52:32 »
My problem is that I'm trying to parachute a bunch of guys out of a fast moving Chinook. In general, it works fine, but there's almost always one bloke or two that don't "get into his parachute", and falls like a stone to the ground. And although it's fun to watch (at least the first time or two), it's just not what I want.

I've tried several different solutions, but to no avail.

The first version of the code was just the old regular

Code: [Select]
_myDude action ["EJECT", _myVehicle];
unassignVehicle _myDude;

When I noticed that some guys didn't get into their parachutes, I thought it was because the Chinook was flying too fast, so I tried this:

Code: [Select]
_oldVelocity = velocity _vehicle;
_oldX = _oldVelocity select 0;
_oldY = _oldVelocity select 1;
_speed = sqrt (_oldX * _oldX + _oldY * _oldY);

? _speed > _speedLimit : goto "safeJump";

_unit action ["EJECT", _vehicle];
goto "rest"

#safeJump
_newX = _speedLimit * _oldX / _speed;
_newY = _speedLimit * _oldY / _speed;
_vehicle setVelocity [_newX, _newY, 0];
_unit action ["EJECT", _vehicle];
_vehicle setVelocity _oldVelocity;

#rest
unassignVehicle _unit;

Didn't work either... So then I tried this:

Code: [Select]
_oldVelocity = velocity _vehicle;
_oldX = _oldVelocity select 0;
_oldY = _oldVelocity select 1;
_speed = sqrt (_oldX * _oldX + _oldY * _oldY);

? _speed > _speedLimit : goto "safeJump";

_unit action ["GETOUT", _vehicle];
_chute = "PARACHUTEWEST" createVehicle getPos _vehicle;
_unit moveInDriver _chute;
_chute setPos (getPos _vehicle);
_chute setVelocity [(velocity _vehicle) select 0, (velocity _vehicle) select 1, 0];
goto "rest"

#safeJump
_newX = _speedLimit * _oldX / _speed;
_newY = _speedLimit * _oldY / _speed;
_unit action ["GETOUT", _vehicle];
_chute = "PARACHUTEWEST" createVehicle getPos _vehicle;
_unit moveInDriver _chute;
_chute setPos (getPos _vehicle);
_chute setVelocity [_newX, _newY, 0];
;_unit action ["EJECT", _vehicle];
;_vehicle setVelocity _oldVelocity;

#rest
unassignVehicle _unit;

which, as you've robably guessed, didn't work either...

So... Does anybody know a failsafe way to parachute my guys from a fast-moving chopper? Or do I have to live with it?

ponq

  • Guest
Re:Secure parachuting possible? (Parachute bug?)
« Reply #1 on: 17 Jul 2004, 00:26:33 »
where do you set _speedlimit?

chig

  • Guest
Re:Secure parachuting possible? (Parachute bug?)
« Reply #2 on: 17 Jul 2004, 00:36:12 »
where do you set _speedlimit?

It's sent as a parameter to the script.

Latest version of script in its entirety:

Code: [Select]
; parachute.sqs - eject everybody except crew
; [chopperName, speedLimit] exec "parachute.sqs"

_vehicle = _this select 0;
_speedLimit = _this select 1;

_vehicleGroup = group _vehicle;
_units = crew _vehicle;
_noUnits = count _units;

_i = 0;

#loop
? _i >= _noUnits : goto "exit";

_unit = _units select _i;
? group _unit == _vehicleGroup : goto "skip";

_oldVelocity = velocity _vehicle;
_oldX = _oldVelocity select 0;
_oldY = _oldVelocity select 1;
_speed = sqrt (_oldX * _oldX + _oldY * _oldY);

? _speed > _speedLimit : goto "safeJump";

_unit action ["GETOUT", _vehicle];
_chute = "PARACHUTEWEST" createVehicle getPos _vehicle;
_unit moveInDriver _chute;
_chute setPos (getPos _vehicle);
_chute setVelocity [(velocity _vehicle) select 0, (velocity _vehicle) select 1, 0];
goto "rest"

#safeJump
_newX = _speedLimit * _oldX / _speed;
_newY = _speedLimit * _oldY / _speed;
_unit action ["GETOUT", _vehicle];
_chute = "PARACHUTEWEST" createVehicle getPos _vehicle;
_unit moveInDriver _chute;
_chute setPos (getPos _vehicle);
_chute setVelocity [_newX, _newY, 0];

#rest
unassignVehicle _unit;
~0.5

#skip
_i = _i + 1;

goto "loop";

#exit
exit;

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Secure parachuting possible? (Parachute bug?)
« Reply #3 on: 17 Jul 2004, 00:37:38 »
do you have 1.96? i've never had the non parachute bug for units that are meant to parachute... i've had the parachute fail on guys bailing out of jets etc
Proud Member of the Volunteer Commando Battalion

chig

  • Guest
Re:Secure parachuting possible? (Parachute bug?)
« Reply #4 on: 17 Jul 2004, 00:41:37 »
do you have 1.96? i've never had the non parachute bug for units that are meant to parachute... i've had the parachute fail on guys bailing out of jets etc

Yep, it's 1.96.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Secure parachuting possible? (Parachute bug?)
« Reply #5 on: 17 Jul 2004, 00:44:05 »
Why do you think its to do with the speed of the chopper?

What is the delay between each loon jumping - could they be too close together?

Is it always the same number in the stick that fails or is it a different one each time?   Or is it a particular type of unit eg sniper?
Plenty of reviewed ArmA missions for you to play

chig

  • Guest
Re:Secure parachuting possible? (Parachute bug?)
« Reply #6 on: 17 Jul 2004, 01:00:44 »
Why do you think its to do with the speed of the chopper?

What is the delay between each loon jumping - could they be too close together?

Is it always the same number in the stick that fails or is it a different one each time?   Or is it a particular type of unit eg sniper?

I really don't have a good reason why I thought it had to do with the speed... At the moment, that just felt like the most probable cause.

Right now, the delay between the jumps is 0.5 seconds. I know, that probably sounds a bit too low, but since the chopper usually travels at a speed > 200 when it drops, that shouldn't really be a problem, me thinks. (It sounds more probable to me that the problem lies in the speed...)

No, no special pattern regarding order or type as far as I have ascertained...

chig

  • Guest
Re:Secure parachuting possible? (Parachute bug?)
« Reply #7 on: 17 Jul 2004, 01:03:33 »
do you have 1.96? i've never had the non parachute bug for units that are meant to parachute... i've had the parachute fail on guys bailing out of jets etc

Just a clarification: The parachute is there, it just seems that the guy aren't in the parachute... The parachute opens like it should, but the guy don't get attached to it, and just falls straight to the ground...

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Secure parachuting possible? (Parachute bug?)
« Reply #8 on: 17 Jul 2004, 01:38:41 »
ok... i've seen that happen before... not sure if its a bug, or that BIS intended it...

anyways, a wait of 0.5s sounds a bit small especially at 200+ kph since the parachutes flap around like crazy at that speed - try altering the bail out time frame, see if that helps matters
Proud Member of the Volunteer Commando Battalion

chig

  • Guest
Re:Secure parachuting possible? (Parachute bug? Yes, kind of!)
« Reply #9 on: 17 Jul 2004, 03:08:23 »
I think I've solved it now. I wrote a long message explaining my theory of why some of the guys fell down from the sky and how I solved it, but when I tried to post, the board said I wasn't logged in, and I couldn't get my text back after that... So I just post my new code...

Code: [Select]
; parachute.sqs - eject everybody except crew
; [chopperName, speedLimit] exec "parachute.sqs"

_vehicle = _this select 0;
_speedLimit = _this select 1;

_vehicleGroup = group _vehicle;
_units = crew _vehicle;
_noUnits = count _units;

_i = 0;

#loop
? _i >= _noUnits : goto "exit";

_unit = _units select _i;
? group _unit == _vehicleGroup : goto "skip";

_oldVelocity = velocity _vehicle;
_oldX = _oldVelocity select 0;
_oldY = _oldVelocity select 1;
_speed = sqrt (_oldX * _oldX + _oldY * _oldY);

? _speed > _speedLimit : goto "safeJump";

_chute = "PARACHUTEWEST" createVehicle getPos _vehicle;
_chute setPos (getPos _vehicle);
_chute setVelocity [(velocity _vehicle) select 0, (velocity _vehicle) select 1, 0];
~0.01
_unit action ["GETOUT", _vehicle];
unassignVehicle _unit;
_unit moveInDriver _chute;
goto "rest"

#safeJump
_newX = _speedLimit * _oldX / _speed;
_newY = _speedLimit * _oldY / _speed;
_chute = "PARACHUTEWEST" createVehicle getPos _vehicle;
_chute setPos (getPos _vehicle);
_chute setVelocity [_newX, _newY, 0];
~0.01
_unit action ["GETOUT", _vehicle];
unassignVehicle _unit;
_unit moveInDriver _chute;

#rest
~0.1

#skip
_i = _i + 1;

goto "loop";

#exit
exit;

I've tested it with various max speeds (up to 250) and bail out time frame (down to 0.1 s), and I haven't had a single guy falling yet.