中国虚拟军事网(VME)- 专注于武装突袭系列虚拟军事游戏

 找回密码
 加入VME

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: gtylll

趁着3D编辑器刚出做个任务玩玩 脚本遇到了问题

[复制链接]
 楼主| 发表于 2016-2-14 00:21:37 | 显示全部楼层
init里加 fn_needReload = compile preprocessFile "reload.sqf";这样对么
 楼主| 发表于 2016-2-14 00:25:42 | 显示全部楼层
gtylll 发表于 2016-2-14 00:21
init里加 fn_needReload = compile preprocessFile "reload.sqf";这样对么

载入脚本后 游戏内控制台使用[单位,音效] call fn_needReload;格式的命令会提示错误
error missing [

点评

fn_needReload = { //直接放到init.sqf _unit = _this select 0; _sound = _this select 1; waitUntil {needReload _unit == 1}; reload _unit; _unit say3D _sound; waitUntil {need   发表于 2016-2-14 13:08
发表于 2016-2-14 13:09:24 | 显示全部楼层
fn_needReload = { //直接放到init.sqf
    _unit = _this select 0;
    _sound = _this select 1;
    waitUntil {needReload _unit == 1};
    reload _unit;
    _unit say3D _sound;
    waitUntil {needReload _unit == 0};
    _this call fn_needReload;
};


想要效果的单位初始栏:[this, "你定义的声效名"] call fn_needReload;

点评

单独开了个新任务进行测试 依然无效  发表于 2016-2-14 20:32
 楼主| 发表于 2016-2-14 20:31:20 | 显示全部楼层

我确认init.sqf/description.ext/单位初始化栏无误,但是fn调用无效 空弹夹时 无论是声效还是换弹都不会触发
并且如果在游戏中的debug console输入[ghost, "reload"] call fn_needreload并运行后
游戏立马停止响应

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入VME

x
 楼主| 发表于 2016-2-15 21:16:18 | 显示全部楼层
gtylll 发表于 2016-2-14 00:02
果然垃圾脚本严重影响性能
换弹和扔雷各1个 3单位分别单独加载 一共6个  直接卡的我任务都进不去了
ghost ...

最后加了sleep 1;一秒判定一次后不卡了
您需要登录后才可以回帖 登录 | 加入VME

本版积分规则

小黑屋|中国虚拟军事网

GMT+8, 2024-3-29 15:57

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表