Doh.. The topic should really be Global vs Local..
When I do like this I get the result I'm after:
(Local b don't change the Global a)
But doing the same thing with a Type:
Why does the Local type change the global one..?
When I do like this I get the result I'm after:
Global a:Int = 1 Function Test() Local b:Int b = a b = 2 EndFunction DebugLog a Test() DebugLog a
(Local b don't change the Global a)
But doing the same thing with a Type:
Type TTest Field x:Int EndType Global a:TTest = New TTest Function Test() Local b:TTest = New TTest b = a b.x = 2 EndFunction a.x = 1 DebugLog a.x Test() DebugLog a.x
Why does the Local type change the global one..?