Skip to content

y3的lua中,能实现"本地变量"的效果吗? #635

@swengjgj

Description

@swengjgj

我们知道 y3.player.with_local() 可以在本地玩家环境中执行代码
那有没有方法能实现本地变量?使这类数据在玩家间互不冲突

我在测试中,玩家1在此函数中改变全局变量X的值,效果竟然对每个玩家都有效

如果能实现本地变量,则很多数据则避免了时刻通过网络同步.这想必更有利于优化

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions