NetworkCreateSynchronisedScene

Client

Using canary? yes
Windows version: 10

Server

Operating system: Windows
Artifact version: 1092
IP address: localhost
Resources: 23

Incident

Summary:
NetworkCreateSynchronisedScene is not synced between players.
Expected behavior:
NetworkCreateSynchronisedScene should be synced
Actual behavior:
the animation is not played
Steps to reproduce:
You can use this code: [Release] After Hours : poster world animation/scene to correctly use NetworkCreateSynchronisedScene
Server/Client?
Client
Error screenshot (if any):
As you can see the attached object follows the animation but the task is not played.

1 Like

Unfortunately this is still a thing.
Also, I’ve noticed that it works fine with some animations/scenes.
Here is a more simple and working repro:

Citizen.CreateThread(function()
	if GetPlayerName(PlayerId()) ~= "pichotm" then return end

	local scissorsNetID
	local dictBase = "misshair_shop@hair_dressers"
	local scissorsModel = GetHashKey("p_cs_scissors_s")

	local function CreateScissors()
		RequestModel(scissorsModel)
		while not HasModelLoaded(scissorsModel) do Wait(0) end

		local ent = CreateObject(scissorsModel, 0.0, 0.0, 0.0, true, true, false)
		SetModelAsNoLongerNeeded(scissorsModel)

		scissorsNetID = ObjToNet(ent)
		SetNetworkIdExistsOnAllMachines(scissorsNetID, true)
	end

	CreateScissors()

	RequestAnimDict(dictBase)
	while not HasAnimDictLoaded(dictBase) do Wait(0) end

	local netScene = NetworkCreateSynchronisedScene(0.0, 0.0, 71.0, 0.0, 0.0, 0.0, 2, 1, 0, 1.0, 0.0, 1.0)
	NetworkAddPedToSynchronisedScene(PlayerPedId(), netScene, dictBase, "keeper_enterchair", 1000.0, -1000.0, 69, 0, 1000.0, 0)
	NetworkAddEntityToSynchronisedScene(NetToEnt(scissorsNetID), netScene, dictBase, "scissors_enterchair", 1000.0, -1000.0, 0)
	NetworkStartSynchronisedScene(netScene)
end)

Is this ever going to be resolved?

nobody knows. if you need it a lot, you can try looking at game code yourself, but so far touching anything 1s-related except significant and trivial bug fixes is something that is very much low priority as every time that’s done something breaks and then people go and complain with issues that are impossible to reproduce without having a huge server

This appears to have been fixed

… that’s weird, as array handlers should still be broken. :open_mouth:

They are still broken, i guess he has done a wrong statement. I already had used a lot of Synchronised scenes and the problem was never consistent on other players screen.

For example: When testing with 2 players, this can take a long time to appear, but when you have a good amount of players nearby, the probability to this appear is way higher (even when using those scenes only on the player ped).

yes still broken, will there be an update for this soon?

also this problem happens randomly, sometimes no issue but sometimes happens this.

i can confirm this problem still exists in latest builds

using

Vector3 coord = GetOffsetFromEntityInWorldCoords(Cabina.Entity.Handle, 0, 0, 0);
int uLocal_376 = NetworkCreateSynchronisedScene(coord.X, coord.Y, coord.Z, 0f, 0f, 0f, 2, true, false, 1f, 0, 1f);
NetworkAddPedToSynchronisedScene(Personaggio.Handle, uLocal_376, "anim@mp_ferris_wheel", "enter_player_"+Posto, 8f, -8f, 131072, 0, 1000f, 0);
NetworkStartSynchronisedScene(uLocal_376);

await BaseScript.Delay(100);

int iVar2 = NetworkGetLocalSceneFromNetworkId(uLocal_376);
while (GetSynchronizedScenePhase(iVar2) < 0.99f)
{
    await BaseScript.Delay(100);
    if (GetSynchronizedScenePhase(iVar2) == 0) break;
}

int uLocal_377 = NetworkCreateSynchronisedScene(coord.X, coord.Y, coord.Z, 0f, 0f, 0f, 2, true, false, 1f, 0f, 1f);
NetworkAddPedToSynchronisedScene(Personaggio.Handle, uLocal_377, "anim@mp_ferris_wheel", "idle_a_player_" + Posto, 8f, -8f, 131072, 0, 1000f, 0);
NetworkStartSynchronisedScene(uLocal_377);

the result is this (seen by another client):

the ped doing the scene starts falling under ground

1 Like

has any fix been found? sorry for the bump

:person_shrugging: dunno :sweat_smile: