Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

Difference between revisions of "Template talk:Navbox unrealscript"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(oh, I definitely am)
Line 1: Line 1:
 
Are you sure about that [[User:Wormbo|Wormbo]]? Self.Function() if the function is declared private/protected is much the same as Global/Super.Function(). Self.Variable is the variable is declared private/protected is much the same as Default.Variable. Though Self is not limited to these cases, it can be used also as in Self.Class, Self.Name, Self.Class.Name. Anyways just curious as to why it only gets the narrow Object Literal specification when obviously it does more then some specifiers. --[[User:00zX|00zX]] 16:49, 16 May 2010 (UTC)
 
Are you sure about that [[User:Wormbo|Wormbo]]? Self.Function() if the function is declared private/protected is much the same as Global/Super.Function(). Self.Variable is the variable is declared private/protected is much the same as Default.Variable. Though Self is not limited to these cases, it can be used also as in Self.Class, Self.Name, Self.Class.Name. Anyways just curious as to why it only gets the narrow Object Literal specification when obviously it does more then some specifiers. --[[User:00zX|00zX]] 16:49, 16 May 2010 (UTC)
 +
 +
:Yes, I am very sure about that. "Self" acts very much like a "magically-typed" variable pointing to the object executing the current code. Most notably can you use "Self" as standalone keyword, unlike default, super or global. Calling it an object literal is as close to reality as you can get, because you can also do stuff like <code>Material'WhiteTexture'.Class</code>, which most likely returns the value <code>class'Texture'</code> in UE1/2 games. Doing stuff like Self.Name is identical to just Name, unless you declare local variables that hide the class variables. And if you look at UnrealScript bytecode, you will find that, unlike Super, Global and Default, access via "Self" has the same format as access via an object reference returned by a variable or function call, with Self being represented by a single-byte token like True, False, 0, 1 and None. —[[User:Wormbo|Wormbo]] 18:22, 16 May 2010 (UTC)

Revision as of 12:22, 16 May 2010

Are you sure about that Wormbo? Self.Function() if the function is declared private/protected is much the same as Global/Super.Function(). Self.Variable is the variable is declared private/protected is much the same as Default.Variable. Though Self is not limited to these cases, it can be used also as in Self.Class, Self.Name, Self.Class.Name. Anyways just curious as to why it only gets the narrow Object Literal specification when obviously it does more then some specifiers. --00zX 16:49, 16 May 2010 (UTC)

Yes, I am very sure about that. "Self" acts very much like a "magically-typed" variable pointing to the object executing the current code. Most notably can you use "Self" as standalone keyword, unlike default, super or global. Calling it an object literal is as close to reality as you can get, because you can also do stuff like Material'WhiteTexture'.Class, which most likely returns the value class'Texture' in UE1/2 games. Doing stuff like Self.Name is identical to just Name, unless you declare local variables that hide the class variables. And if you look at UnrealScript bytecode, you will find that, unlike Super, Global and Default, access via "Self" has the same format as access via an object reference returned by a variable or function call, with Self being represented by a single-byte token like True, False, 0, 1 and None. —Wormbo 18:22, 16 May 2010 (UTC)