Author Topic: Can I add a datablock mid-server? [SOLVED]  (Read 957 times)

Is it possible to add a datablock mid-game without having everyone leave/crash?
I was told to do this...
Code: [Select]
function allReloadDatablocks()
{
messageAll('',"\c6Reloading datablocks...");
for(%i=0;%i<ClientGroup.getCount();%i++)
{
commandToClient(ClientGroup.getObject(%i),'missionPreparePhase1');
commandToClient(ClientGroup.getObject(%i),'missionStartPhase1');
commandToClient(ClientGroup.getObject(%i),'missionPreparePhase2');
commandToClient(ClientGroup.getObject(%i),'missionStartPhase2');
commandToClient(ClientGroup.getObject(%i),'missionStartPhase3');
}
}

But that doesn't actually download the datablock. Is there a way to force datablock redownloading?
« Last Edit: December 11, 2013, 06:15:45 PM by Club559 »

Does the new datablock have files that aren't already used by previous ones?

Does the new datablock have files that aren't already used by previous ones?

Not really, just the datablock itself.

Not really, just the datablock itself.
...
does it reference any files

...
does it reference any files

I just answered that pretty much. It only references files that have already been used by other datablocks. The only new thing about it is the datablock itself.

I just answered that pretty much. It only references files that have already been used by other datablocks. The only new thing about it is the datablock itself.
transmitdatablocks(); should do the job then. takes a few seconds to finish.

transmitdatablocks(); should do the job then. takes a few seconds to finish.

Alright, thanks for the help.