Member Declarations

Member declarations define data within a structure or class that can be accessed either within methods of the object or its derived classes, or indirectly from instances of it with the member access operator.


MemberDeclarationFlag* Type VariableName (, VariableName)* ;

Member Declaration Flags

deprecatedIf accessed, a script warning will occur on load if the archive version is greater than the version specified, with the optional reason specified in the message.
internalMember is only writable from the base resource archive. Version 3.4.0 and newer.
latentDoes nothing. Purpose unknown.
metaMember is read-only static class data. Only really useful on actors, since these can be set via properties on them.
nativeMember is from the engine. Only usable internally.
playMember has Play scope.
privateMember is not visible to any class but this one.
protectedMember is not visible to any class but this one and any descendants of it.
readOnlyMember is not writable, but is part of instances, rather than static class data.
transientMember is not saved into save games. Required for unserializable objects and recommended for UI context objects.
uiMember has UI scope.
versionRestricted to ZScript version ver or higher.


Member Declarations

// An integer. Visible to and modifiable by everything.
int m_MyCoolInt;
// Three separate integers, defined short-hand.
int m_CoolInt1, m_CoolInt2, m_CoolInt3;
// Ten integers in one variable.
int[10] m_CoolIntArray;
// Can only be seen by this type.
private int m_CoolPrivateInt;
// Read-only; part of the class data, can only be seen by descendant types.
protected meta int m_CoolMetaInt;