这样啊那我就随便用了,我还特意找了曾经玩过的一个任务求证那时候几个人联机玩网络环境很好游戏不同步值基本都为0,其他玩家的倒计时读秒效果就像是本地玩家执行一样流畅不跳秒卡数字,如果遇到网络环境差的出现黄链红链丢包严重的就不知道了,不过别人也是这么写的哈哈...
while {alive _unit && _unit getVariable ["r3_unitIsDown",0] == 1 && _unit getVariable ["r3_unitIsStabi",0] == 0 && time < (_bleedOut -1) } do {
_nextAiCall = _nextAiCall +1;
if(_nextAiCall >= 10 && _unit getVariable ["r3_unitGetRevive",0] == 0 && _unit getVariable ["r3_unitGetDrag",0] == 0) then {
_nextAiCall = 0;
if(r3_reviveEnableAiRevive) then { [_unit] spawn r3_aiReviveAi; };
};
_unit setVariable ["r3_unitbleedOut",round(_bleedOut - time), true];//他每秒全局公布一次变量
sleep 1;
}; |