找回密码
 点一下
查看: 2413|回复: 4

请教   急

[复制链接]
发表于 2007-2-2 18:57:24 | 显示全部楼层 |阅读模式
我朋友给我说用这个方法可以判断创建者的
但是怎么搞进去???
WE还是JS????
WE的话   怎么编辑???




SyncStoredInteger()

这个函数会以主机的值为标准同步所有电脑上的GameCache

新建一个名叫Host的变量~~类型是Player~~

然后执行以下动作~~



QUOTE:

Game Cache - Create a game cache from Host.w3v

Custom script:   call StoreIntegerBJ( GetConvertedPlayerId(GetLocalPlayer()), "Host", "Host", GetLastCreatedGameCacheBJ() )

Custom script:   call SyncStoredInteger(GetLastCreatedGameCacheBJ(), "Host", "Host")
Set Host = (Player((Load Host of Host from (Last created game cache))))
发表于 2007-2-2 19:12:33 | 显示全部楼层
[trigger]
Host
    Events
        Map initialization
    Conditions
    Actions
        Game Cache - Create a game cache from Host.w3v
        Custom script:   call StoreIntegerBJ( GetConvertedPlayerId(GetLocalPlayer()), "Host", "Host", GetLastCreatedGameCacheBJ() )
        Custom script:   call SyncStoredInteger(GetLastCreatedGameCacheBJ(), "Host", "Host")
        Set Host = (Player((Load Host of Host from (Last created game cache))))
[/trigger]

另外引用麦德大人的话
该函数有小概率造成同步对象不是主机
所以要多次判断取次数最多的值作为主机
回复

使用道具 举报

发表于 2007-2-2 23:08:27 | 显示全部楼层
楼主这个朋友完全是粘贴的我的回复啊~~

不过我当时忘记说要在前后加TriggerSyncStart和TriggerSyncReady~~但是最近听说又有一说SyncStoredInteger本身就包含了TriggerSync的过程~~这一点我未证实~~
回复

使用道具 举报

发表于 2007-2-3 00:43:53 | 显示全部楼层
引用第2楼麦德三世2007-02-02 23:08发表的:
楼主这个朋友完全是粘贴的我的回复啊~~
因为LS的回复总是那么地深奥
回复

使用道具 举报

发表于 2007-2-12 15:43:37 | 显示全部楼层
多次同步一样不能准确判断  好像还有什么干扰因素  比如——聊天
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-5-22 21:59 , Processed in 0.063308 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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