-
Notifications
You must be signed in to change notification settings - Fork 27
UnrealScript in LegendaryExplorer
There are two good general UnrealScript references:
- The official docs: docs.unrealengine.com/udk/Three/UnrealScriptHome.html
- The wiki: wiki.beyondunreal.com/UnrealScript_reference
I've often found the wiki to be more illuminating than the official docs, but both contain useful information. If either site is ever down, you can access them through the wayback machine on archive.org
The UnrealScript that you can write in LegendaryExplorer is a slightly different dialect than the one used in UnrealEd/UDK. In this list of differences, UScript will refer to the UnrealEd/UDK dialect of UnrealScript, and LEXScript will refer to the LegendaryExplorer dialect.
-
LEXScript does not support multiline comments (
/* */
). -
In UScript,
Inner classes declared with a within clause can access members of the specified outer class without having to qualify the access with the Outer property declared in Object.
This is not true in LEXScript. You must access outer class members via the Outer property. -
In UScript all three statements in a for loop must be present (
for (initstatement; loopcondition; updatestatement)
), and theupdatestatement
must be an assignment or function call. In LEXScript, theinitstatement
andupdatestatement
are optional, and theupdatestatement
can be any statement. -
In UScript, when declaring a dynamic array of delegates or class limiters, you must put a space between the last two right carets, like so:
array<delegate<delegatename> >
orarray<class<classname> >
. In LEXScript the space is unnecessary, you can just typearray<class<classname>>
. -
In UScript, enum values can be used bare, without a reference to the enum type (similar to c++). In LEXScript, you must qualify all enum values with the the enum type. (UScript:
Explosion
, LEXScript:EAttackType.Explosion
) -
In UScript, Name literals in the defaultproperties section can be bare or in double quotes. In LEXScript, they must be in single-quotes, the same as everywhere else.