nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

"ValueChange" event not called on connect #1004

Open Timmy-the-nobody opened 4 months ago

Timmy-the-nobody commented 4 months ago

Prerequisites

Your Environment

Description

The “ValueChange” event is not called on the client side after joining a server on which some entities have networked key/values defined with SetValue The value is set correctly tho, it's just that the event is only triggered on the client when it's set while the client is connected

Steps to reproduce the behavior

Expected behavior

The "ValueChange" event should be called each time the value is set imo, even if it's after the first sync on the client

Actual behavior

The "ValueChange" event is only called clientside for entities that are spawned while the value is changed (and not for the initial sync or existing entities)

gtnardy commented 4 months ago

in fact they are not called, when joining the design is that you should iterate/get the value manually to find it

Timmy-the-nobody commented 4 months ago

Thanks for the answer, I thought it wasn't intentional as it make some parts of the scripts redundant I'll adapt to this design if you want to keep it like that then