if you leave out the "for XY" it's equivalent to writing "for This"
This is always the context you're in, like CTmMode, CTmMlScriptIngame, CSmMode, etc.
that "for" part basically says that the Object is carrying the variable you are declaring
this way it will keep being accessible as long as the object is alive
the "persistent" modifier just says that the object should persist it so that it can still be accessed after a restart and a new object of the same type has been created
a
Code: Select all
declare persistent Variable for Map
has a different value than
Code: Select all
declare persistent Variable for User
because they are owned by different objects
similar to that there are the netwrite/netread modifiers
can be used to send data between server and client because the UI object synchronizes its owning variables between the two
->
for reading the Variable on the other end
it can be seen as "Key-Value-Coding" which is common in many languages