Home   Help Search Login Register  

Author Topic: Airborne troops jump  (Read 2277 times)

0 Members and 1 Guest are viewing this topic.

101

  • Guest
Airborne troops jump
« on: 12 Jul 2007, 13:51:02 »
Hey, Guys!

I have my problem: I work on a campaign, but I am not able to solve a thing in the intro.sqs.

I would like, that the soldiers to jump one by one from Black Hawk and not in a time!

I wrote to the intro.sqs this, but doesn't work it:

_cam camsettarget heli
_cam camsetrelpos [-40,30,50]
_cam camcommit 0
~20

_parachuteArray = [a1,a2,a3,a4,a5,a6,a7,a7];

{ _x action ["EJECT", uh6]; sleep 1; } forEach _parachuteArray;


What must I write, so that "jump time" operates? ???


Thanks, 101



Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Airborne troops jump
« Reply #1 on: 12 Jul 2007, 14:01:35 »
is the chopper "heli" or "uh6"?? :blink:

Code: [Select]
_cam camsettarget heli
_cam camsetrelpos [-40,30,50]
_cam camcommit 0
~20

_parachuteArray = [a1,a2,a3,a4,a5,a6,a7,a7];
_i = 0;
#jump
(_parachuteArray select _i) action ["EJECT", uh6]   <<<<<<< uh6 or heli there?
unassignVehicle (_parachuteArray select _i)
~1
_i = _i + 1
? _i < (count _parachuteArray): goto "jump"


Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Airborne troops jump
« Reply #2 on: 12 Jul 2007, 15:19:30 »
Plus you have a7 ejecting twice.

Make sure you unassign all units from the helicopter after they jump.
urp!

101

  • Guest
Re: Airborne troops jump
« Reply #3 on: 12 Jul 2007, 18:48:45 »
Thanks code, but unfortunately dosn't work! :(

I wrote to the intro.sqs:

_cam camsettarget heli
_cam camsetrelpos [-40,30,50]
_cam camcommit 0
~20

_parachuteArray = [a1,a2,a3,a4,a5,a6,a7,];
_i = 0;
#jump
(_parachuteArray select _i) action ["EJECT", heli]   
unassignVehicle (_parachuteArray select _i)
~1
_i = _i + 1
? _i < (count _parachuteArray): goto "jump"


....but this error message appears:

'parachuteArray
  • [a1,a2,a3,a4,a5,a6,a7,];

Error Generic error in expression


I checked it the editor: my soldiers name (a1, a2, a3....etc) is good, Black Hawk name "heli" is good. What's the problem?



Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Airborne troops jump
« Reply #4 on: 12 Jul 2007, 18:50:53 »
Remove the final ',' from:

_parachuteArray = [a1,a2,a3,a4,a5,a6,a7,];

so it reads:

_parachuteArray = [a1,a2,a3,a4,a5,a6,a7];


Planck
I know a little about a lot, and a lot about a little.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Airborne troops jump
« Reply #5 on: 12 Jul 2007, 20:10:16 »
Go to the ed depot and download the paradrop.sqs
It'll do it for you.

Just need to call it with
Code: [Select]
[groupname,heliname] exec "paradrop.sqs"
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Airborne troops jump
« Reply #6 on: 12 Jul 2007, 20:35:28 »
Or, you use the one that is within the game already..
No downloads nor writing own scripts required, unless of course you want to learn scripting, and then it comes highly recommended that you write your own and study scripts by others..

You execute it with
Code: [Select]
[leader of the group to jump,chopper] exec "para.sqs"
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

101

  • Guest
Re: Airborne troops jump
« Reply #7 on: 12 Jul 2007, 22:24:52 »
Just need to call it with
Code: [Select]
[groupname,heliname] exec "paradrop.sqs"

Yes, I tried this script previously, but in this they jump also together. If I remember well...




101

  • Guest
Re: Airborne troops jump
« Reply #8 on: 12 Jul 2007, 22:30:50 »
You execute it with
Code: [Select]
[leader of the group to jump,chopper] exec "para.sqs"
What script-commands I must write to the "para.sqs"?

I greet your help!

101


Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Airborne troops jump
« Reply #9 on: 12 Jul 2007, 22:42:46 »
First, do not double post.
If you have something to add to your previous post modify it instead of replying to yourself..

You don't need to add anything to the para.sqs, it's written by someone while game developement and included in one of the game files (probably for campaign usage), all you need to do is to execute it like that from a trigger, a waypoint (trigger is more reliable) or from another script..

I think in your case this should work
Code: [Select]
[a1,heli] exec "para.sqs"
EDIT:
This is what script has in it, in case you're interested
Code: [Select]
; Parachute
; start as: [para_leader, para_vehicle] exec "para.sqs"
_who = group (_this select 0)
_veh = _this select 1

_aunits = units _who

_i = 0
_j = count _aunits

#Loop
(_aunits select _i) action ["EJECT",_veh]
unassignvehicle (_aunits select _i)
_i=_i+1
~1
?_j>_i:goto "Loop"

{unassignvehicle _x} forEach _aunits

_veh flyInHeight 50
« Last Edit: 12 Jul 2007, 23:40:32 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Airborne troops jump
« Reply #10 on: 13 Jul 2007, 02:03:18 »
Cool. I didn't know that was in there.
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."