注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

.

.

 
 
 

日志

 
 

武装突袭2 脚本任务编辑 -12 人质解救脚本/动作脚本  

2012-01-12 18:14:07|  分类: 脚本和编辑 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
人质解救是军事行动的一个项目,在武装突袭2 中设定一个俘虏任务.就需要用到,如何设定解救的动作脚本

调用方式:(如图片) : execVM 命令
武装突袭2 脚本任务编辑 -12 人质解救脚本/动作脚本 - foxer - .

设定被俘属性: setCaptive

_woman = _this select 0;
_woman setcaptive true;


设定被俘的动作/检测解救  循环设定: switchMove 命令

_CivnotRescued = true;

while {_CivnotRescued} do {
_num=(ceil(Random 4));//随机四种动作
if (_num==0) then {_woman switchmove "WomanBoundcaptive_loop"};
....
if (_num==4) then {_woman switchmove "WomanBoundcaptive_loop4"};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false}; //解救后
if (not alive _woman) exitwith {_woman removeaction _hostageact1};//死亡后
sleep 1;
...
};

该命令删除添加的动作:解救按键 "Untie"
removeaction
武装突袭2 脚本任务编辑 -12 人质解救脚本/动作脚本 - foxer - .
 添加 解救按键 "Untie"
_hostageact1 = _woman addaction ["Untie","hostagevars.sqf"];
武装突袭2 脚本任务编辑 -12 人质解救脚本/动作脚本 - foxer - .
 
执行解救动作:
 
武装突袭2 脚本任务编辑 -12 人质解救脚本/动作脚本 - foxer - .

if (alive _woman) then {
player attachto [_woman,[0,-0.8,0]];
player setdir 0;
player switchmove "AinvPknlMstpSnonWrflDnon_medic";
sleep 3;
player switchmove "AinvPknlMstpSnonWrflDnon_medicEnd";
sleep 1;
player switchmove "";
_woman playmove "WomanBoundcaptive_Unaerc";
detach player;
sleep 2;
_woman enableAI "MOVE";
// just put // before this if you dont want the unit to join your group
[_woman] joinsilent player;
};

个人觉得这个解救动作有点多余,可以不要,设定解救,然后加入游戏组,可以设置

 
下载地址 :http://www.assaultmissionstudio.de/downloads/arma2/scripte/Hostage_scripts.rar
Hostage_female.sqf
// execute with in womans initline.
// _null = [this] execVM "Hostage_female.sqf"

// hostage
_CivnotRescued = true;
_woman = _this select 0;
_woman setcaptive true;
_hostageact1 = _woman addaction ["Untie","hostagevars.sqf"];
while {_CivnotRescued} do {
_num=(ceil(Random 4));//随机四种动作
if (_num==0) then {_woman switchmove "WomanBoundcaptive_loop"};
if (_num==1) then {_woman switchmove "WomanBoundcaptive_loop1"};
if (_num==2) then {_woman switchmove "WomanBoundcaptive_loop2"};
if (_num==3) then {_woman switchmove "WomanBoundcaptive_loop3"};
if (_num==4) then {_woman switchmove "WomanBoundcaptive_loop4"};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false}; //解救后
if (not alive _woman) exitwith {_woman removeaction _hostageact1};//死亡后
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
sleep 1;
if (not(captive _woman)) then {_CivnotRescued = false};
if (not alive _woman) exitwith {_woman removeaction _hostageact1};
};

_woman removeaction _hostageact1; //活着 被解救处理
_woman disableAI "MOVE";
if (alive _woman) then {
player attachto [_woman,[0,-0.8,0]];
player setdir 0;
player switchmove "AinvPknlMstpSnonWrflDnon_medic";
sleep 3;
player switchmove "AinvPknlMstpSnonWrflDnon_medicEnd";
sleep 1;
player switchmove "";
_woman playmove "WomanBoundcaptive_Unaerc";
detach player;
sleep 2;
_woman enableAI "MOVE";
// just put // before this if you dont want the unit to join your group
[_woman] joinsilent player;
};


Hostage_male.sqf
// execute with in units initline.
// _null = [this] execVM "Hostage_male.sqf"
// hostage
_CivnotRescued = true;
_man = _this select 0;
_man setcaptive true;
_hostageact1 = _man addaction ["Untie","hostagevars.sqf"];

while {_CivnotRescued} do {
_num=(ceil(Random 3));
if (_num==0) then {_man switchmove "civilsitting"};
if (_num==1) then {_man switchmove "civilsitting01"};
if (_num==2) then {_man switchmove "civilsitting02"};
if (_num==3) then {_man switchmove "civilsitting03"};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
sleep 1;
if (not(captive _man)) then {_CivnotRescued = false};
if (not alive _man) exitwith {_man removeaction _hostageact1};
};

_man removeaction _hostageact1;
_man disableAI "MOVE";
if (alive _man) then {
player attachto [_man,[0,-0.9,0]];
player setdir 0;
player switchmove "AinvPknlMstpSnonWrflDnon_medic";
sleep 3;
player switchmove "AinvPknlMstpSnonWrflDnon_medicEnd";
sleep 1;
player switchmove "";
_man switchmove "SitStandUp";
detach player;
sleep 2;
_man enableAI "MOVE";
// just put // before this if you dont want the unit to join your group
[_man] joinsilent player;
};


Hostagevars.sqf

// set unit not captive
_unit=_this select 0;
_unit setcaptive false;

  评论这张
 
阅读(1116)| 评论(0)
推荐

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017