An easy way to fix this is having an event each time a variable changes... Such as:
PHP Code:
function variableChanged( varName, oldValue, newValue )
{
triggerclient(stuff_here, "updateVar", this.name, varName, newValue );
}
Then having the clientside find the TStaticVar name:
(@ this.name ).(@ varName ) = newValue;
The this.name should be matching on both clientside and serverside for this to work, however... But it would be one method to do it.