Table of Contents
- Core
- Number = first()
- Number = duped()
- Number = inputClk()
- String = inputClkName()
- Number = last()
- Number = dupefinished()
- Number = removing()
- runOnLast(Number Activate)
- exit()
- error(String Reason)
- assert(Number Condition)
- assert(Number Condition, String Reason)
- reset()
- Number = ops()
- Number = Entity:ops()
- Number = opcounter()
- Number = cpuUsage()
- Number = Entity:cpuUsage()
- Number = perf()
- Number = perf(Number N)
- Number = minquota()
- Number = maxquota()
- Number = softQuota()
- Number = hardQuota()
- Number = timeQuota()
- Gtable = select(Number Index, Gtable Argument1, ...)
- WireLink = select(Number Index, WireLink Argument1, ...)
- RangerData = select(Number Index, RangerData Argument1, ...)
- ComplexNumber = select(Number Index, ComplexNumber Argument1, ...)
- Tracedata = select(Number Index, Tracedata Argument1, ...)
- Effect = select(Number Index, Effect Argument1, ...)
- String = select(Number Index, String Argument1, ...)
- Array = select(Number Index, Array Argument1, ...)
- Vector2 = select(Number Index, Vector2 Argument1, ...)
- Entity = select(Number Index, Entity Argument1, ...)
- Matrix = select(Number Index, Matrix Argument1, ...)
- Table = select(Number Index, Table Argument1, ...)
- Vector = select(Number Index, Vector Argument1, ...)
- Matrix4 = select(Number Index, Matrix4 Argument1, ...)
- Vector4 = select(Number Index, Vector4 Argument1, ...)
- Matrix4 = select(Number Index, Matrix4 Argument1, ...)
- Number = select(Number Index, Number Argument1, ...)
- Stcontrol = select(Number Index, Stcontrol Argument1, ...)
- Bone = select(Number Index, Bone Argument1, ...)
- Ftrace = select(Number Index, Ftrace Argument1, ...)
- Quaternion = select(Number Index, Quaternion Argument1, ...)
- Angle = select(Number Index, Angle Argument1, ...)
Core
= first()
Returns 1 if the expression was spawned or reset (1 ops)
= duped()
Returns 1 if the expression was duplicated (1 ops)
= inputClk()
Returns 1 if the expression was triggered by an input (1 ops)
= inputClkName()
(1 ops)
= last()
Returns 1 if it is being called on the last execution of the expression gate before it is removed or reset. This execution must be requested with the runOnLast(1) command (1 ops)
= dupefinished()
Returns 1 when the contraption has finished duping. (1 ops)
= removing()
Returns 1 if this is the last() execution and caused by the entity being removed (1 ops)
runOnLast(
Activate)
If set to 1, the chip will run once when it is removed, setting the last() flag when it does (1 ops)
exit()
Stops the execution of any code after it (2 ops)
error(
Reason)
Shuts down the E2 with specified script error message (2 ops)
assert(
Condition)
If the argument is 0, shut down the E2 with an error message (2 ops)
assert(
Condition,
Reason)
If the first argument is 0, shut down the E2 with the given error message string (2 ops)
reset()
Reset the expression itself as if it was just spawned, stops execution (100 ops)
= ops()
Returns how many ops are used every execution on average (1 ops)
=
:ops()
(1 ops)
= opcounter()
Returns how many ops have been used so far in this execution plus the amount of hard quota used (1 ops)
= cpuUsage()
Returns the average time per tick the server spends running this E2, in seconds (multiply it by 1000000 to get the same value as is displayed on the E2 overlay) (1 ops)
=
:cpuUsage()
Returns the average time per tick the server spends running the specified E2, in seconds (multiply it by 1000000 to get the same value as is displayed on the E2 overlay) (1 ops)
= perf()
If used as a while loop condition, stabilizes the expression around hardquota used (1 ops)
= perf(
N)
If used as a while loop condition, stabilizes the expression around specified number (in %) (1 ops)
= minquota()
The ops left before soft quota is used up (1 ops)
= maxquota()
The ops left before hard quota is exceeded and the expression shuts down (1 ops)
= softQuota()
Returns the size of the soft quota (1 ops)
= hardQuota()
Returns the size of the hard quota (1 ops)
= timeQuota()
Returns the time quota in seconds (1 ops)
Gtable = select(
Index, Gtable Argument1, ...)
Returns the Nth value given after the index, gtable's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, wirelink's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, ranger's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, complex's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
Tracedata = select(
Index, Tracedata Argument1, ...)
Returns the Nth value given after the index, tracedata's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
Effect = select(
Index, Effect Argument1, ...)
Returns the Nth value given after the index, effect's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, string's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, array's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, vector2's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, entity's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, matrix's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, table's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, vector's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, matrix4's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, vector4's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, matrix2's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, number's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
Stcontrol = select(
Index, Stcontrol Argument1, ...)
Returns the Nth value given after the index, stcontrol's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, bone's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
Ftrace = select(
Index, Ftrace Argument1, ...)
Returns the Nth value given after the index, ftrace's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, quaternion's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, angle's zero element otherwise. If you mix types, the behaviour is undefined (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