Skip to content

UnrealScript in LegendaryExplorer

Natalie Howes edited this page Sep 20, 2021 · 3 revisions

There are two good general UnrealScript references:

  1. The official docs: docs.unrealengine.com/udk/Three/UnrealScriptHome.html
  2. 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 the updatestatement must be an assignment or function call. In LEXScript, the initstatement and updatestatement are optional, and the updatestatement 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> > or array<class<classname> > . In LEXScript the space is unnecessary, you can just type array<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.

Clone this wiki locally