Home   Help Search Login Register  

Author Topic: SOLVED: Parachuting script issues  (Read 1604 times)

0 Members and 1 Guest are viewing this topic.

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
SOLVED: Parachuting script issues
« on: 20 Jan 2008, 13:49:48 »
I'm using the BIS parachuting script in a defend mission to drop units over a firebase. Unfortunately additional parachutes are deployed for each extra person on the server. Which, yeah, gets pretty interesting with two choppers bailing troops and twenty people on the server.  :whistle:

Basically after a little script that will delete empty parachutes for the duration of the drop rather than try and fix the script itself. Any help would be much appreciated. Cheers!

Dan
« Last Edit: 20 Jan 2008, 22:36:36 by CAS_Daniel »
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Parachuting script issues
« Reply #1 on: 20 Jan 2008, 14:00:22 »
If you know the drop position, and you know when the drop script is executed, you may execute another that looks for parachutes in the area using nearestObjects command, then check which ones have no driver and delete them.

Something like:
Code: [Select]
// remove_empty_chutes.sqf
Sleep 2;
_chutes = nearestObjects[_pos_chute_drop, ["ParachuteWest"], 200];
{
   if (!alive driver _x) then
   {
      deleteVehicle _x;
   };
} forEach _chutes;

Make sure to use the correct chute type for your mission.

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re: Parachuting script issues
« Reply #2 on: 20 Jan 2008, 14:49:04 »
Thanks for the quick reply and explanation! Much appreciated. I havn't used .sqf files in ArmA yet, never needed them in OFP. I assume they're similar to .sqs scripts. I'll have a bash now.
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Parachuting script issues
« Reply #3 on: 20 Jan 2008, 15:29:19 »
SQS
Code: [Select]
;remove_empty_chutes.sqs
~2
_chutes = nearestObjects[_pos_chute_drop, ["ParachuteWest"], 200]
{if (!alive driver _x) then {deleteVehicle _x}} forEach _chutes

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re: Parachuting script issues
« Reply #4 on: 20 Jan 2008, 16:32:37 »
Thanks!

Trying it out, currently getting this error.



I've changed ["ParachuteWest"] to ["ParachuteEast"].
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Parachuting script issues
« Reply #5 on: 20 Jan 2008, 17:27:45 »
Did you set _pos_chute_drop to the drop position?

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re: Parachuting script issues
« Reply #6 on: 20 Jan 2008, 18:34:05 »
Have now  :whistle:

Sorry, learning chunks everytime I try to use a script.  :P It's working now, very happy indeed!
However, some of the empty chutes don't get deleted. I've tried setting the 200 in the nearestobject part to 2000, i'm guessing thats the distance from the drop position. Is there another reason? Does the script stop running after a short period of time?

Again, much appreciated.
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Parachuting script issues
« Reply #7 on: 20 Jan 2008, 21:40:32 »
The script in that shape runs and checks for the chutes only once. You might run it more than once waiting 2 or 3 seconds. Or:
Code: [Select]
~2
_chutes = nearestObjects[_pos_chute_drop, ["ParachuteWest"], 200]
{if (!alive driver _x) then {deleteVehicle _x}} forEach _chutes
~2
_chutes = nearestObjects[_pos_chute_drop, ["ParachuteWest"], 200]
{if (!alive driver _x) then {deleteVehicle _x}} forEach _chutes
~2
_chutes = nearestObjects[_pos_chute_drop, ["ParachuteWest"], 200]
{if (!alive driver _x) then {deleteVehicle _x}} forEach _chutes
~2
_chutes = nearestObjects[_pos_chute_drop, ["ParachuteWest"], 200]
{if (!alive driver _x) then {deleteVehicle _x}} forEach _chutes

That will delete chutes ever 2 seconds four times.

Offline CAS_Daniel

  • Members
  • *
  • Rifleman
Re: Parachuting script issues
« Reply #8 on: 20 Jan 2008, 22:35:26 »
Works like a charm!

Thanks a lot.  :good:
Romeo 2.5 UK-based Light Infantry Platoon
forums.romeo25.com/