OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: 101 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
-
is the chopper "heli" or "uh6"?? :blink:
_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"
-
Plus you have a7 ejecting twice.
Make sure you unassign all units from the helicopter after they jump.
-
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
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?
-
Remove the final ',' from:
_parachuteArray = [a1,a2,a3,a4,a5,a6,a7,];
so it reads:
_parachuteArray = [a1,a2,a3,a4,a5,a6,a7];
Planck
-
Go to the ed depot and download the paradrop.sqs
It'll do it for you.
Just need to call it with [groupname,heliname] exec "paradrop.sqs"
-
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
[leader of the group to jump,chopper] exec "para.sqs"
-
Just need to call it with
[groupname,heliname] exec "paradrop.sqs"
Yes, I tried this script previously, but in this they jump also together. If I remember well...
-
You execute it with
[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
-
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
[a1,heli] exec "para.sqs"
EDIT:
This is what script has in it, in case you're interested
; 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
-
Cool. I didn't know that was in there.