欢迎你香港的朋友,DT最近出差了。关于空投下面的教程可能对你有所帮助
Helicopter boarding
1. 制作小队
2. 制作直升机
3. 制作直升机的路点
4. 制作小队的
因为我们大家都喜欢在自己的任务中使用从直升机上空降,所以我们写这个教学指南.教学指南将会详细讲解如何着路的细节,如果你在阅读完这个教程以后还有不懂的地方,你可以到最下面的地址去下载SAMPLE MISSION.
现在我们来做一个新任务,要有直升机降落接人的场面。打开任务编辑器,选择一个你喜欢的地区(在这里我们选择Everon的飞机跑道,具体地点如图T1所示)。然后我们要做一个小队和一架直升机,给小队取名为grp1, 给飞机取名为helo1.
具体做法如下:
制作小队:
你可以像以前我们所说的那样先放一个Playable的队长,再放几个Playable的队员(其中玩家要选Player,再注明:至于是不是一定要把玩家设置成为Player,现在已经不是绝对的了,因为这个教程是针对1.1版本而言,我从网上的资料得知,在1.1版本以后,都已经对这个设置进行了升级,不必理会),注意所有队员和队长之间要连有一条蓝线(包括队长在内,最多能放12人)。
还有一个简单的办法,就是按F2, 在地图上双击,然后在Group窗口里的"Side:"旁选West或East, 在"Type:"旁选Infantry, 在"Name:"旁选Infantry Squad. 这样就会自动的造出一个小队,其中有一个队长,7个队员(注意要把队长和队员都设为Playable--其中玩家为队员,设为Player);再把此小队取名为grp1--点一下队长,在Units窗口里的Initialization旁输入 grp1 = group this (见T2)
Group :
Side: West
Type: Infantry
Name: Infantry Squad
制作直升机:
按F1, 在Units窗口里选Side: West, Class: Air, Unit: UH60-MG, Name: helo1.(见T3)
制作直升机的Waypoints:
点一下直升机,按F4, 在小队的附近做一个Load WP, 属性如下:
Select Type: Load
On Activation: "_x assignascargo helo1" foreach units grp1; "[_x] ordergetin true" foreach units grp1
-------------------(队长会命令队员们一个一个的上飞机,当他每次命令一个队员登机后,变量_x就会加1, 然后下一个队员就会接到登机的命令,直到所有人都上了飞机为止)
做完登机的WP后,再做一个Move WP, 让飞机接完人后就起飞。
制作小队的Waypoints:
点一下队长,在直升机的Load WP旁放一个Move WP. 然后按F5--Synchronize, 把飞机的Load WP和小队的Move WP连起来.
注意:只有在队长为Player, 也就是AI的时候,此任务才能进行!(KuKluxKlan: 我试过把对长选为Playable, 任务也能进行,只不过就得我亲自发命令让他们登机)
Parachuting空降跳伞动作的制作
1. 创建小队
2. 创建直升机
3. 指定队员的开始位置在UH60-MG里
4. 制作.sqs脚本文件
5. 给UH60-MG创建Waypoints和实施脚本文件
3K和FREE-SNIPER提醒大家:
因为前面已经讲过如何添加UNITS,OBJECTS等等细节,所以这里我们将不在详细述说,同时大家也可以对照英文来看翻译,顺便提高一下英语水平.嘿嘿
This tutorial will teach you how to implement parachute drops in your own missions. We have had a lot of requests for this tutorial and it's indeed one of the coolest things to do in a mission. Start of by starting the editor and loading the island of your choice (we used Everon for the example mission).
在这个教程中,我们将教大家如何在自己的任务加入跳伞动作,
选一个你喜欢的地图,细节略过(这里我们还用Everon)。
==========================================================
Creating the infantry group you want to parachute:
First you'll have to create an infantry group, either by using the group tool (F2) or by placing your units and using the group tool to group them. Once you have created your group, give the leader a name in the Name field. In this tutorial we will use L1. You will also have give the group a group name so it can be identified later on. To do this go into the group leader's properties and in the Initialization field type:
grp = group this
Where it says grp, you can place the name of your choice, but for this tutorial we will use grp.
先来做个小队(用我们以前提到过的2种方法里的任何一个都行);做完以后,别忘了给队长取个名字(这里我们就叫他L1吧,见T2);
然后再给小队取个名字,选中队长,在Units窗口里的Initialization旁输入
grp = group this
(你可以把grp改成其它名字)。
===============================================
Creating the helicopter to use for the transportation:
To create the helicopter you will need to press F1 first, to select the Units tool. Then double-click somewhere on the map, which will open up the Units window. In the Side drop down menu, choose West, since we will be using a NATO UH60-MG helicopter. After this select Air from the Class drop down menu. Next we'll go to the Units drop down menu and select the UH60-MG. You also need give the helicopter a name. In this tutorial we used helo1.
You have now created a UH60-MG named helo1.
接下来做个直升机--按F1, Side: West, Class: Air, Unit: UH60-MG, 取名为helo1.
====================================================
Commanding the infantry group to start out in the UH60-MG:
The easiest way to command the infantry squad to board the UH60-MG is to type the command for it in their Initialization field:
this moveincargo helo1
helo1 is the name of the designated vehicle, the UH60-MG in this case.
Note: since the squad's leader already has a command in his Init, you will have to use a special sign (;) and a space to add a second independent command. The command line now runs like this:
grp = group this; this moveincargo helo1
指定队员的开始位置在UH60-MG里:.
让队员坐在飞机里的最简单方法就是在所有队员的Initialization里输入
this moveincargo helo1.
注:因为在队长的Initialization旁原先就有一条命令grp = group this, 所以我们要用分号和空格来把这两个命令分开:
grp = group this; this moveincargo helo1
注意:在这个任务中,helo1就是UH60-MG的名字.所以不要写成
this moveincargo UH60-MG
=====================================================
Creating the script file (.sqs) which will order the units to eject
You will have to create a script file which will tell the infantry group to disembark in midair. To do this, you must first create a Wordpad file with any name, ending with the file extension .sqs. For this tutorial, we will use the script name AlphaExit.sqs. Put the following in the text file:
_aunits = units L1
_i = 0
_Max = count _aunits
#Here
(_aunits select _i) action ["EJECT",helo1]
unassignvehicle (_aunits select _i)
_i=_i+1
~1
?_Max>_i:goto "Here"
exit
Definition of the script file:
This script may look difficult, but it really isn't that hard to understand, because you'll only have to edit 2 words:
_aunits = units L1 -------------- In this line, where it has the L1 you put in the name of the infantry squad's leader. This line will create an array (some sort of table) with all the unit ID numbers of the squad's members in it (the mission automatically gives all units such a number. You can locate it in the mission.sqm file if you wish). This array will be used later on.
(_aunits select _i) action ["EJECT",helo1] -- In this line, all you have to edit is the word helo1. Instead of that you can put the name of the helicopter name you used. This command line will first select a unit ID# from the array _aunits and then order this unit to eject the helicopter. The value of _i will increment by 1 every time the script has given its orders to a unit.
For those of you who would like to fully understand the rest of the lines too, check the below definitions:
_i = 0 -- This will set the local variable (local variables are only used in the script itself and not any other part of the mission) _i to 0, which is its initial value.
_Max = count _aunits -- This will count the amount of unit ID#s in the array _aunits. This is done because the script then knows how many units there are in the squad and thus how many times it will have to loop the eject command. It will give the amount the variable name _Max.
#Here -- This creates a 'marker' in the script which can be referred to using the goto command. For those of you familiar with web design, it's like a named anchor.
unassignvehicle (_aunits select _i) -- This unassigns the unit from the vehicle, meaning the helicopter can be used by other soldiers again. While a vehicle is assigned to a unit, no one else can use it.
_i=_i+1 -- This increases the value of _i by 1 everytime the script passes this point (performs a loop)
~1 -- Like we explained before, this command will delay the script for 1 second before carrying on.
?_Max>_i:goto "Here" -- This will make the script go back to the #Here marker as long as the script has not ordered all units to eject yet (thus as long as _Max is not bigger than the amount of units in the squad _i)
exit -- This will exit the script.
After you have created the script file, save it to you mission’s directory.
要想命令队员跳伞,我们得做一个.sqs脚本文件。文件名可以随便起,这里我们叫它AlphaExit.sqs, 在里面输入:
_aunits = units L1 --------(此命令会建立一个序列表,里面有全部队员的ID号码--任务会自动给队员编号;这里的L1就是队长)
_i = 0
_Max = count _aunits ------(此命令会算出在序列_aunits里一共有几个ID号,这样脚本就会知道在此小队里一共有多少人,也就是说跳伞的命令应该被重复几次)
#Here
(_aunits select _i) action ["EJECT",helo1] -------(此命令首先会从序列_aunits里面选出一个队员的ID号,然后命令他跳伞,每当一个 队员接到跳伞的命令后,_i的值就会加1)
unassignvehicle (_aunits select _i)
_i=_i+1
~1
?_Max>_i:goto "Here"
exit
把这个.sqs文件放在任务文件夹里。
=========================================
Creating the necessary waypoints for the UH60-MG, and executing the script file:
First you need to click on the UH60-MG and hit F4 to select the Waypoint tool. Next double click somewhere on the map where you want your first WP to be. In this tutorial, we will have 3 waypoints; 1 telling the UH60-MG to move to a spot and fly a bit higher, another one to move to a spot and execute the script file you made and a third WP that will tell the UH60-MG to move away from the area.
Once you have created your first WP, double click somewhere else on the map where you want your units to start their paratrooping. In this WP's properties, make the WP Type Move. Now in the second WP's properties, in the On Activation field, type this:
player exec "AlphaExit.sqs"
This will make the player unit execute the script. You can use any unit name here, but using player here is the best option since he is the last one to die (the script will be of no use to you when you are dead). Where it says AlphaExit.sqs, you can put the name of the script you made, in this case AlphaExit.sqs.
Note: The minimum height for a parachute operation is around 75-80 meter, but there is a great risk of injury when you perform a jump that low. So try sticking around 110-125 meters high. To command the helicopter to fly higher than its standard flight height, type this in its Initialization field, or a WP's On Activation field (we chose to put in the first WP).
helo1 flyinheight 120
Where it says helo1 you can put the name of your helicopter. And where it says 120, put the height (in meters) you want the helicopter to fly at.
That's it, you have now created your very first helicopter parachute jump!
给UH60-MG创建Waypoints和实施脚本文件。
我们需要放3个WP:
第一个放在飞机前,属性为Move, 在On Activation旁输入
helo1 flyinheight 125
这样飞机一起飞就会升到125米高的地方(见T3)
第二个放在小队旁边,属性为Move, 在On Activation旁输入player exec "AlphaExit.sqs";(见T4)第三个可以随便放,选Move.
注:75-80米是允许跳伞的最低高度,很容易受伤,所以最好定在110-125米的高空。 |