|
发表于 2016-3-14 15:50:30
|
显示全部楼层
本帖最后由 chaoduichen 于 2016-3-14 15:54 编辑
单位初始栏里传参 要写 0=[this] execVM "act.sqf";
你开玩笑,查看一下act.sqf,
- private["_ai"];
- scopename "main";
- _ai=_this select 0;
- while{alive _ai}
- do { if (!Bfired)then
- {
- _ai playmove "AmovPercMstpSnonWnonDnon_exercisePushup";sleep 1.0;
- }
- else {sleep 1;
- _ai switchmove "";
- hint "Danger!";
- _ai setBehaviour"Coambat";
- _ai domove getpos player;
- breakto "main"
- };
- };
复制代码
通过_this 接受参数数组第一个元素 _this 指的是传给脚本的参数数组,调用时决定 比如0=[123,player,"FUCK"]execVM"XXX.sqf"
|
|