Table of Contents
- Matrix
- Matrix4 = matrix2()
- Matrix4 = matrix2(Vector2 Rv1, Vector2 Rv2)
- Matrix4 = rowMatrix2(Vector2 Rv1, Vector2 Rv2)
- Matrix4 = matrix2(Number Rv1, Number Rv2, Number Rv3, Number Rv4)
- Matrix4 = matrix2(Matrix Rv1)
- Matrix4 = identity2()
- Vector2 = Matrix4:row(Number Rv2)
- Vector2 = Matrix4:column(Number Rv2)
- Matrix4 = Matrix4:setRow(Number Rv2, Number Rv3, Number Rv4)
- Matrix4 = Matrix4:setRow(Number Rv2, Vector2 Rv3)
- Matrix4 = Matrix4:setColumn(Number Rv2, Number Rv3, Number Rv4)
- Matrix4 = Matrix4:setColumn(Number Rv2, Vector2 Rv3)
- Matrix4 = Matrix4:swapRows()
- Matrix4 = Matrix4:swapColumns()
- Number = Matrix4:element(Number Rv2, Number Rv3)
- Matrix4 = Matrix4:setElement(Number Rv2, Number Rv3, Number Rv4)
- Matrix4 = Matrix4:swapElements(Number Rv2, Number Rv3, Number Rv4, Number Rv5)
- Vector2 = diagonal(Matrix4 Rv1)
- Number = trace(Matrix4 Rv1)
- Number = det(Matrix4 Rv1)
- Matrix4 = transpose(Matrix4 Rv1)
- Matrix4 = adj(Matrix4 Rv1)
- Matrix = matrix()
- Matrix = matrix(Vector Rv1, Vector Rv2, Vector Rv3)
- Matrix = rowMatrix(Vector Rv1, Vector Rv2, Vector Rv3)
- Matrix = matrix(Number Rv1, Number Rv2, Number Rv3, Number Rv4, Number Rv5, Number Rv6, Number Rv7, Number Rv8, Number Rv9)
- Matrix = matrix(Matrix4 Rv1)
- Matrix = identity()
- Vector = Matrix:row(Number Rv2)
- Vector = Matrix:column(Number Rv2)
- Matrix = Matrix:setRow(Number Rv2, Number Rv3, Number Rv4, Number Rv5)
- Matrix = Matrix:setRow(Number Rv2, Vector Rv3)
- Matrix = Matrix:setColumn(Number Rv2, Number Rv3, Number Rv4, Number Rv5)
- Matrix = Matrix:setColumn(Number Rv2, Vector Rv3)
- Matrix = Matrix:swapColumns(Number Rv2, Number Rv3)
- Number = Matrix:element(Number Rv2, Number Rv3)
- Matrix = Matrix:setElement(Number Rv2, Number Rv3, Number Rv4)
- Matrix = Matrix:swapElements(Number Rv2, Number Rv3, Number Rv4, Number Rv5)
- Matrix = Matrix:setDiagonal(Vector Rv2)
- Matrix = Matrix:setDiagonal(Number Rv2, Number Rv3, Number Rv4)
- Vector = diagonal(Matrix Rv1)
- Number = trace(Matrix Rv1)
- Number = det(Matrix Rv1)
- Matrix = transpose(Matrix Rv1)
- Matrix = adj(Matrix Rv1)
- Matrix = matrix(Entity Rv1)
- Vector = Matrix:x()
- Vector = Matrix:y()
- Vector = Matrix:z()
- Matrix = matrix(Angle Ang)
- Angle = Matrix:toAngle()
- Matrix = mRotation(Vector Rv1, Number Rv2)
- Matrix4 = matrix4()
- Matrix4 = matrix4(Vector4 Rv1, Vector4 Rv2, Vector4 Rv3, Vector4 Rv4)
- Matrix4 = rowMatrix4(Vector4 Rv1, Vector4 Rv2, Vector4 Rv3, Vector4 Rv4)
- Matrix4 = matrix4(Number Rv1, Number Rv2, Number Rv3, Number Rv4, Number Rv5, Number Rv6, Number Rv7, Number Rv8, Number Rv9, Number Rv10, Number Rv11, Number Rv12, Number Rv13, Number Rv14, Number Rv15, Number Rv16)
- Matrix4 = matrix4(Matrix4 Rv1)
- Matrix4 = matrix4(Matrix4 Rv1, Matrix4 Rv2, Matrix4 Rv3, Matrix4 Rv4)
- Matrix4 = matrix4(Matrix Rv1)
- Matrix4 = identity4()
- Vector4 = Matrix4:row(Number Rv2)
- Vector4 = Matrix4:column(Number Rv2)
- Matrix4 = Matrix4:setRow(Number Rv2, Number Rv3, Number Rv4, Number Rv5, Number Rv6)
- Matrix4 = Matrix4:setRow(Number Rv2, Vector4 Rv3)
- Matrix4 = Matrix4:setColumn(Number Rv2, Number Rv3, Number Rv4, Number Rv5, Number Rv6)
- Matrix4 = Matrix4:setColumn(Number Rv2, Vector4 Rv3)
- Matrix = Matrix:swapRows(Number Rv2, Number Rv3)
- Matrix4 = Matrix4:swapColumns(Number Rv2, Number Rv3)
- Number = Matrix4:element(Number Rv2, Number Rv3)
- Matrix4 = Matrix4:setElement(Number Rv2, Number Rv3, Number Rv4)
- Matrix4 = Matrix4:swapElements(Number Rv2, Number Rv3, Number Rv4, Number Rv5)
- Matrix4 = Matrix4:setDiagonal(Vector4 Rv2)
- Matrix4 = Matrix4:setDiagonal(Number Rv2, Number Rv3, Number Rv4, Number Rv5)
- Vector4 = diagonal(Matrix4 Rv1)
- Number = trace(Matrix4 Rv1)
- Matrix4 = transpose(Matrix4 Rv1)
- Matrix4 = inverseA(Matrix4 Rv1)
- Matrix4 = matrix4(Entity Rv1)
- Vector = Matrix4:x()
- Vector = Matrix4:y()
- Vector = Matrix4:z()
- Vector = Matrix4:pos()
- Matrix4 = matrix4(Angle Ang)
- Matrix4 = matrix4(Angle Ang, Vector Pos)
Matrix
= matrix2()
Creates a 2x2 zero matrix (1 ops)
= matrix2(
Rv1,
Rv2)
Creates a matrix with vectors by columns (5 ops)
= rowMatrix2(
Rv1,
Rv2)
Creates a 2x2 matrix with 2D vectors by rows (5 ops)
= matrix2(
Rv1,
Rv2,
Rv3,
Rv4)
Creates a matrix with values in order (i.j) of: (1,1), (1,2), (2,1), (2,2) (5 ops)
= matrix2(
Rv1)
Converts a 3x3 matrix into a 2x2 matrix - all (i,3) and (3,j) are omitted (5 ops)
= identity2()
Creates a 2x2 identity matrix (5 ops)
=
:row(
Rv2)
Returns the row as a 2D vector (5 ops)
=
:column(
Rv2)
Returns the column as a 2D vector (5 ops)
=
:setRow(
Rv2,
Rv3,
Rv4)
Sets the values of a row. The first argument given specifies the row(j), the following arguments are the values 1j, 2j (5 ops)
=
:setRow(
Rv2,
Rv3)
Sets the values of a row. The first argument given specifies the row, the vector contains the values to set (5 ops)
=
:setColumn(
Rv2,
Rv3,
Rv4)
Sets the values of a column. The first argument given specifies the column(i), the following arguments are the values i1, i2 (5 ops)
=
:setColumn(
Rv2,
Rv3)
Sets the values of a column. The first argument given specifies the column, the vector contains the values to set (5 ops)
=
:swapRows()
Swaps rows (5 ops)
=
:swapColumns()
Swaps columns (5 ops)
=
:element(
Rv2,
Rv3)
Returns the element with indices (i,j) (5 ops)
=
:setElement(
Rv2,
Rv3,
Rv4)
Sets an element's value. The first two arguments specify the indices (i,j), the third argument is the value to set it to (5 ops)
=
:swapElements(
Rv2,
Rv3,
Rv4,
Rv5)
Swaps two elements, specified by indices ( i1, j1, i2, j2 ) (5 ops)
= diagonal(
Rv1)
Returns a 2D vector comprising the elements along the leading diagonal (5 ops)
= trace(
Rv1)
Returns the trace of a matrix (5 ops)
= det(
Rv1)
Returns the determinant of a matrix (Does not work for 4x4 matrices) (5 ops)
= transpose(
Rv1)
Returns the transpose of a matrix (5 ops)
= adj(
Rv1)
Returns the adjugate of a matrix (Does not work for 4x4 matrices) (5 ops)
= matrix()
Creates a 3x3 zero matrix (1 ops)
= matrix(
Rv1,
Rv2,
Rv3)
Creates a matrix with vectors by columns (5 ops)
= rowMatrix(
Rv1,
Rv2,
Rv3)
Creates a 3x3 matrix with vectors by rows (5 ops)
= matrix(
Rv1,
Rv2,
Rv3,
Rv4,
Rv5,
Rv6,
Rv7,
Rv8,
Rv9)
Creates a matrix with 9 values in the following order (i.j): (1,1), (1,2), (1,3), (2,1) etc (5 ops)
= matrix(
Rv1)
Converts a 2x2 matrix into a 3x3 matrix - all (i,3) and (3,j) are filled with 0's (5 ops)
= identity()
Creates a 3x3 identity matrix (5 ops)
=
:row(
Rv2)
Returns the row as a vector (5 ops)
=
:column(
Rv2)
Returns the column as a vector (5 ops)
=
:setRow(
Rv2,
Rv3,
Rv4,
Rv5)
Sets the values of a row. The first argument given specifies the row(j), the following arguments are the values 1j, 2j, 3j (5 ops)
=
:setRow(
Rv2,
Rv3)
Sets the values of a row. The first argument given specifies the row, the vector contains the values to set (5 ops)
=
:setColumn(
Rv2,
Rv3,
Rv4,
Rv5)
Sets the values of a column. The first argument given specifies the column(i), the following arguments are the values i1, i2, i3 (5 ops)
=
:setColumn(
Rv2,
Rv3)
Sets the values of a column. The first argument given specifies the column, the vector contains the values to set (5 ops)
=
:swapColumns(
Rv2,
Rv3)
Swaps the two columns specified (5 ops)
=
:element(
Rv2,
Rv3)
Returns the element with indices (i,j) (5 ops)
=
:setElement(
Rv2,
Rv3,
Rv4)
Sets an element's value. The first two arguments specify the indices (i,j), the third argument is the value to set it to (5 ops)
=
:swapElements(
Rv2,
Rv3,
Rv4,
Rv5)
Swaps two elements, specified by indices ( i1, j1, i2, j2 ) (5 ops)
=
:setDiagonal(
Rv2)
Sets the elements of the leading diagonal from the components of a vector (5 ops)
=
:setDiagonal(
Rv2,
Rv3,
Rv4)
Sets the elements of the leading diagonal (5 ops)
= diagonal(
Rv1)
Returns a vector comprising the elements along the leading diagonal (5 ops)
= trace(
Rv1)
Returns the trace of a matrix (5 ops)
= det(
Rv1)
Returns the determinant of a matrix (Does not work for 4x4 matrices) (5 ops)
= transpose(
Rv1)
Returns the transpose of a matrix (5 ops)
= adj(
Rv1)
Returns the adjugate of a matrix (Does not work for 4x4 matrices) (5 ops)
= matrix(
Rv1)
Creates a reference frame matrix from an entity's local direction vectors by columns in the order ( x, y, z ) (5 ops)
=
:x()
Returns the local x direction vector from a 3x3 coordinate reference frame matrix ( same as M:column(1) ) (5 ops)
=
:y()
Returns the local y direction vector from a 3x3 coordinate reference frame matrix ( same as M:column(2) ) (5 ops)
=
:z()
Returns the local z direction vector from a 3x3 coordinate reference frame matrix ( same as M:column(3) ) (5 ops)
= matrix(
Ang)
Returns a 3x3 reference frame matrix as described by the angle A. Multiplying by this matrix will be the same as rotating by the given angle (5 ops)
=
:toAngle()
Returns an angle derived from a 3x3 rotation matrix (5 ops)
= mRotation(
Rv1,
Rv2)
Creates a 3x3 rotation matrix, where the vector is the axis of rotation, and the number is the angle (anti-clockwise) in degrees. Example*: to rotate a vector (7,8,9) by 50 degrees about the axis (1,1,0), you would write V = mRotation(vec(1,1,0), 50) * vec(7,8,9) (5 ops)
= matrix4()
Creates a 4x4 zero matrix (1 ops)
= matrix4(
Rv1,
Rv2,
Rv3,
Rv4)
Creates a matrix with vectors by columns (5 ops)
= rowMatrix4(
Rv1,
Rv2,
Rv3,
Rv4)
Creates a 4x4 matrix with 4D vectors by rows (5 ops)
= matrix4(
Rv1,
Rv2,
Rv3,
Rv4,
Rv5,
Rv6,
Rv7,
Rv8,
Rv9,
Rv10,
Rv11,
Rv12,
Rv13,
Rv14,
Rv15,
Rv16)
Creates a matrix with 16 values in the following order (i.j): (1,1), (1,2), (1,3), (1,4), (2,1) etc (5 ops)
= matrix4(
Rv1)
Converts a 2x2 matrix into a 4x4 matrix - all (i,3), (i,4), (3,j) and (4,j) are filled with 0's (5 ops)
= matrix4(
Rv1,
Rv2,
Rv3,
Rv4)
Constructs a 4x4 matrix from four 2x2 matrices (5 ops)
= matrix4(
Rv1)
Converts a 3x3 matrix into a 4x4 matrix - all (i,4) and (4,j) are filled with 0's (5 ops)
= identity4()
Creates a 4x4 identity matrix (5 ops)
=
:row(
Rv2)
Returns the row as a 4D vector (5 ops)
=
:column(
Rv2)
Returns the column as a 4D vector (5 ops)
=
:setRow(
Rv2,
Rv3,
Rv4,
Rv5,
Rv6)
Sets the values of a row. The first argument given specifies the row(j), the following arguments are the values 1j, 2j, 3j, 4j (5 ops)
=
:setRow(
Rv2,
Rv3)
Sets the values of a row. The first argument given specifies the row, the vector contains the values to set (5 ops)
=
:setColumn(
Rv2,
Rv3,
Rv4,
Rv5,
Rv6)
Sets the values of a column. The first argument given specifies the column(i), the following arguments are the values i1, i2, i3, i4 (5 ops)
=
:setColumn(
Rv2,
Rv3)
Sets the values of a column. The first argument given specifies the column, the vector contains the values to set (5 ops)
=
:swapRows(
Rv2,
Rv3)
Swaps the two rows specified (5 ops)
=
:swapColumns(
Rv2,
Rv3)
Swaps the two columns specified (5 ops)
=
:element(
Rv2,
Rv3)
Returns the element with indices (i,j) (5 ops)
=
:setElement(
Rv2,
Rv3,
Rv4)
Sets an element's value. The first two arguments specify the indices (i,j), the third argument is the value to set it to (5 ops)
=
:swapElements(
Rv2,
Rv3,
Rv4,
Rv5)
Swaps two elements, specified by indices ( i1, j1, i2, j2 ) (5 ops)
=
:setDiagonal(
Rv2)
Sets the elements of the leading diagonal from the components of a vector (5 ops)
=
:setDiagonal(
Rv2,
Rv3,
Rv4,
Rv5)
Sets the elements of the leading diagonal (5 ops)
= diagonal(
Rv1)
Returns a 4D vector comprising the elements along the leading diagonal (5 ops)
= trace(
Rv1)
Returns the trace of a matrix (5 ops)
= transpose(
Rv1)
Returns the transpose of a matrix (5 ops)
= inverseA(
Rv1)
Finds the matrix inverse of a standard 4x4 affine transformation matrix ( the type created by matrix4(E) ). This should only be used on matrices with a particular format, where the top left 3x3 specifies rotation, the rightmost 3-column specifies translation, and the bottom row is (0,0,0,1) (5 ops)
= matrix4(
Rv1)
Creates a 4x4 reference frame matrix from an entity's local direction vectors by columns in the order (x, y, z, pos), with the bottom row (0,0,0,1) (5 ops)
=
:x()
Returns the local x direction vector from a 4x4 coordinate reference frame matrix (5 ops)
=
:y()
Returns the local y direction vector from a 4x4 coordinate reference frame matrix (5 ops)
=
:z()
Returns the local z direction vector from a 4x4 coordinate reference frame matrix (5 ops)
=
:pos()
Returns the position vector from a 4x4 coordinate reference frame matrix (5 ops)
= matrix4(
Ang)
Returns a 4x4 reference frame matrix as described by the angle A. Multiplying by this matrix will be the same as rotating by the given angle (5 ops)
= matrix4(
Ang,
Pos)
Returns a 4x4 reference frame matrix as described by the angle A and the position V. Multiplying by this matrix will be the same as rotating by the given angle and offsetting by the given vector (5 ops)
Expression 2 ⚙️
Getting Started 🕊
- Syntax 🔣
- Directives 🎛️
- Editor 🖥️
- Ops 📊
Guides (In learning order) 🎓
- Learning & Getting Help 📚
- Triggers ⏲️
- Events 🎬
- Find Functions 🔍
- Physics 🚀
- EGP Basics 📈
- Lambdas λ
- Lambda Timers λ⏲️
- Tips & Tricks 📘
Tools 🛠️
Click To Expand
Advanced
- 🟥 SPU
- 🟥 Address Bus
- 🟥 Extended Bus
- 🟥 Plug/Socket
- 🟥 Port
- 🟥 Transfer Bus
- 🟩 GPU
- 🟥 Dynamic Memory
- 🟥 Flash EEPROM
- 🟥 ROM
Beacon 💡
- 🟧 Beacon Sensor
- 🟧 Locator
- 🟧 Target Finder
- 🟧 Waypoint
- 🟥 XYZ Beacon
Control 🎛️
- 🟩 CPU
- 🟩 Expression 2
- 🟩 Gates
- 🟥 PID
Data 💿
- 🟧 CD Disk
- 🟥 CD Ray
- 🟧 DHDD
- 🟥 Keycard
- 🟥 RAM-card
- 🟧 Satellite Dish
- 🟧 Store
- 🟧 Transferer
- 🟥 Wired Wirer
Detection 👀
- 🟧 Adv Entity Marker
- 🟧 Damage Detector
- 🟧 Entity Marker
- 🟧 GPS
- 🟧 Gyroscope
- 🟥 HighSpeed Ranger
- 🟧 Laser Pointer Receiver
- 🟥 Microphone
- 🟧 Ranger
- 🟧 Speedometer
- 🟧 Water Sensor
Display 💻
- 🟧 7 Segment Display
- 🟥 Adv. Hud Indicator
- 🟧 Console Screen
- 🟧 Control Panel
- 🟧 Digital Screen
- 🟧 EGP v3
- 🟧 Fix RenderTargets
- 🟥 GPULib Switcher
- 🟧 Hud Indicator
- 🟧 Indicator
- 🟧 Lamp
- 🟧 Light
- 🟧 Oscilloscope
- 🟧 Pixel
- 🟧 Screen
- 🟧 Sound Emitter
- 🟧 Text Screen
Render 🖌
- 🟩 Cam Controller
- 🟧 Colorer
- 🟧 FX Emitter
- 🟧 HighSpeed Holoemitter
- 🟧 HoloEmitter
- 🟧 HoloGrid
- 🟥 Interactable Holography Emitter
- 🟥 Materializer
- 🟥 Painter
I/O 🔌
- 🟧 Adv. Input
- 🟧 Button
- 🟧 Constant Value
- 🟥 Door Controller
- 🟧 Dual Input
- 🟧 Dynamic Button
- 🟧 Eye Pod
- 🟧 Graphics Tablet
- 🟧 Keyboard
- 🟥 Lever
- 🟧 Numpad
- 🟧 Numpad Input
- 🟧 Numpad Output
- 🟧 Plug
- 🟧 Pod Controller
- 🟧 Radio
- 🟧 Relay
- 🟧 Text Receiver
- 🟧 Two-way Radio
- 🟧 Vehicle Controller
Physics 🚀
- 🟥 Door
- 🟥 Adv. Dupe. Teleporter
- 🟥 Buoyancy
- 🟧 Clutch
- 🟧 Detonator
- 🟧 Explosives
- 🟧 Explosives (Simple)
- 🟥 Forcer
- 🟩 Freezer
- 🟧 Gimbal (Facer)
- 🟧 Grabber
- 🟧 Hoverball
- 🟧 Hoverdrive Controller
- 🟥 Hydraulic
- 🟧 Igniter
- 🟧 Nailer
- 🟩 Prop Spawner
- 🟥 Servo
- 🟥 Simple Servo
- 🟧 Thruster
- 🟥 Touchplate
- 🟥 Trail
- 🟩 Turret
- 🟩 User
- 🟥 Vector Thruster
- 🟥 Vehicle Exit Point
- 🟧 Weight (Adjustable)
- 🟧 Weld/Constraint Latch
- 🟥 Wheel
- 🟥 Wire Magnet
- 🟥 Wired Npc Controller
Utilities 🛠️
- 🟧 Debugger
- 🟥 GUI Wiring
- 🟥 Multi Wire
- 🟧 Namer
- 🟥 Simulate Data
- 🟩 Wiring
RFID 💳
- 🟥 Beam Reader
- 🟥 Implanter
- 🟥 Reader
- 🟥 Target Filter
- 🟥 User Reader
Wireless 🛜
Gates 🚥
Click To Expand
TBD
Extras 🔭
Please do not alter the e2 docs ...
pages manually.
They are autogenerated from the E2Helper. In the future, this will hopefully be its own dedicated website or tool.
Default Extensions
Basic Features: core, debug, number, selfaware,
string, timer
🌎 World: angle, color, find, ranger, sound,
🔣 Math: bitwise, complex, matrix, quaternion, vector, vector2/4
📦 Entities: bone, constraint, egp, entity, hologram, npc
👨 Players: chat, console, player, weapon
📊 Data storage: array, files, globalvars, serialization, table
💬 Communication: datasignal, http, signal, wirelink,
❓ Informational: gametick, serverinfo, steamidconv, unitconv
Additional Extensions
Disabled by default: constraintcore, effects, propcore, remoteupload, wiring
Wire-Extras (repo): camera, ftrace, holoanim, light, stcontrol, tracesystem