OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Muddy Waters on 24 Jul 2004, 18:10:41
-
ok, i have a squd in a c-47 (world war II cargo plane) an another 2 squads in 2 seperate planes. Now with the c-47, the player can, via the action menu, eject the paratroopers in the plane heÂ's in. I want the other two sqauds in the other planes to jump out at a trigger, i also want the players squad to do the same. How do i do this?
note!: it takes the c-47 approx 30 seconds to eject the paratroopers once the command is selected. The plane reduces speed and height.
thanks lads!
-
Look in the editor depot, there must be three or four eject scripts there.
-
what i used to do when i couldn't be bothered to look for scripts was just create a load of triggers one after another (all of them at west = present) and on the activation menu i would put unitname action ["eject",heliname]
so i would create about 12 triggers (2 units ejecting at each one), each being rectangular and 200 long (x axis) and 5 to 10 thick (y axis) and all right on top of eachother. i did this so they didn't all jump out at the same time because if they do they crash into eachother and die.
i personally hate writing scripts because i have just about no knowlege of c/c++ or whatever it is called. so i improvise, i can even create artillerry bombardments just by using the mission editor.
-
Triggers an be messy in a high traffic area on the map. Scripts are so much better, plus some are already made for you and all you gotta do is put in your mission folder and put this "this exec "script.sqs".... ::)
Creating explosions with init lines and trig lines is actually small scripts themselves....
Unless you blow up a fuel truck and deletevehicle it... :P
But that might be a script to.
EDIT: some smaller triggers will not always be set off by aircraft or helis due to speed... :P
-
what i used to do when i couldn't be bothered to look for scripts was just create a load of triggers one after another (all of them at west = present) and on the activation menu i would put unitname action ["eject",heliname]
so i would create about 12 triggers (2 units ejecting at each one), each being rectangular and 200 long (x axis) and 5 to 10 thick (y axis) and all right on top of eachother. i did this so they didn't all jump out at the same time because if they do they crash into eachother and die.
i just tried this but nothing happens when i do it. could you explain how to do again
-
Ahhh so many triggers.... :noo: :noo:
:P
-
hey ryan kaplan could u explain again how to do the parachuting thing with triggers???
-
hey.. could u explain again how to do the parachuting thing with triggers???
:) ellöw matey, do this:
Make a trigger, make it a "switch" -trigger, then hit F2 and drag a grouping line from trigger to aircraft.
This way, only THAT plane can fire the trigger (i.e. no chopper, tank or some other ground unit
will accidentially hit the trigger & make the men bail before time, heh.) :P ::) ;D
Now, in the trigger's ACTIVATION field, put the following:
bob action ["eject", plane1]; unassignVehicle bob
...where BOB is the named parad00d and PLANE-1 is the named aircraft.
the "unassign.." stuff is just to avoid errors like if the pilot thinks that your
men bailed out by accident and turns his plane to get them back in! ::) :noo:
-
hey tom, i tried the unassign thing you mentioned, but, it didnÂ't work. i tried with the troops in the cargo as members of the sme squad as the plane and as them seperate, but the plane still turned around to pick them up again. Any other suggestions, or an i doing something wrong?
-
now i see why scripting is better lol
-
... i tried with the troops in the cargo ...but the plane still turned around to pick them up ...
:( sh*t happens, m8 ::) ;D are ya SURE :o that the plane/pilot is NOT in the same grp as the cargo troops? ???
maybe I forgot to mention it but it works best if the cargo & the driver of any transport vehicle are in seperate groups.
:) if in doubt, check the green grouping lines between the units.
(is your editor set to "advanced" at all? Yanno, it should be; I was just curious about this)
Any'ho - with planes, two or three men can bail at the same time without problems,
so here's once again what I would do (I'll just use the cessna plane as example) :
Create a cessna plane, name it "CEZ" in the name field when creating it.
Then create a squad of three units, make sure they're NOT grouped to the plane/pilot.
:o Now, in the INIT field of the grpLeader, put this spell :
morons=group this; "_x moveinCargo CEZ" foreach units morons
This should kick the men in cargo of the plane right from mission start :-*
ok. Then setup a trigger with the following spell in the "activation" field :
"_x action [""eject"", CEZ]" foreach units morons; "UnassignVehicle _x" foreach units morons
Make it a SWITCH type of trigger and hit F2 & group it to the aircraft.
Then make the plane "flying" (just for the test of things) and create yet another flying
cessie right behind it, not grouped to the other plane nor to the morons,
and make YOU the pilot of this second plane. This way you can fly behind and check it all out. ;)
do it, or I'll fry your M16 and melt it and put it on my pizza ... TONIGHT!!! >:( ;D ;D