-
Notifications
You must be signed in to change notification settings - Fork 340
e2 docs entity
Gets the entity associated with the id (5 ops)
Gets the numeric id of an entity (5 ops)
(5 ops)
Returns the time the entity was created on, relative to curtime. (5 ops)
Returns an invalid entity (5 ops)
Returns the world entity (5 ops)
Gets the name of a player (5 ops)
Gets the class of an entity (5 ops)
(5 ops)
Gets the model of an entity (5 ops)
Gets the owner of an entity (5 ops)
Returns an array containing all entities on the map (100 ops)
Returns the keyvalue table of an entity (20 ops)
Sets an editable property to the string-encoded value. Returns 1 if it succeeded (20 ops)
Returns a string encoding of the editable property (20 ops)
Returns a look-up table of editable values on an editable entity (30 ops)
Returns 1 if the entity has editable properties (1 ops)
Gets the position of the entity (5 ops)
Gets the forward direction of the entity 2) (5 ops)
Gets the right direction of the entity (5 ops)
Gets the up direction of the entity (5 ops)
Gets the velocity of the entity (5 ops)
Gets the local velocity of the entity (5 ops)
Gets the world velocity of a point in world coordinates attached to the entity (5 ops)
Gets the angular velocity of the entity (5 ops)
Returns rotation axis, velocity and direction given as the vector's direction, magnitude and sense (5 ops)
Returns the vector direction that points towards the sun (5 ops)
Transforms from a vector local to E to a world vector (15 ops)
Transforms from a world vector to a vector local to E (15 ops)
Transforms an axis local to E to a global axis (15 ops)
Transforms a world axis to an axis local to E (15 ops)
Transforms from an angle local to E to a world angle (15 ops)
Transforms from a world angle to an angle local to E (15 ops)
Gets the health of the entity (5 ops)
Gets the max health of the entity (5 ops)
Gets the size of the object (not precisely, but useful) (5 ops)
Gets the bearing from the entity to the vector (15 ops)
Gets the elevation from the entity to the vector (15 ops)
Gets the elevation and bearing from the entity to the vector (15 ops)
Gets the mass of the entity (10 ops)
Gets the Center of Mass of the entity (10 ops)
Gets the center of mass as a local vector (10 ops)
Sets the mass of the E2 chip (between 0.001 and 50,000) (10 ops)
Sets the mass of the entity (between 0.001 and 50,000) (10 ops)
Gets the volume of the entity (10 ops)
Gets the surface area of the entity (10 ops)
Gets the stress of the entity (10 ops)
Returns current friction events of the entity as a table of tables [https://wiki.facepunch.com/gmod/PhysObj:GetFrictionSnapshot] (10 ops)
Is the entity a player? (10 ops)
Is the entity a NPC? (10 ops)
Is the entity a NextBot? (10 ops)
Is the entity a ragdoll? (10 ops)
Is the entity a vehicle? (10 ops)
Is the entity the world? (10 ops)
Is the player/NPC resting on something? (10 ops)
Is the entity under water? (10 ops)
Returns 1 if the entity is valid, 0 otherwise (10 ops)
Returns 1 if the entity has valid physics (players don't) (10 ops)
Gets the pitch, yaw and roll of the entity (10 ops)
Returns the material of an entity (10 ops)
(10 ops)
(20 ops)
Sets the material of an entity (10 ops)
(10 ops)
Gets Es current skin number (10 ops)
Sets the skin of an entity (10 ops)
Gets Es number of skins (10 ops)
Group ID, Group SubID Sets the bodygroups of the given entity (10 ops)
(10 ops)
Group ID Returns the number of bodygroups in the Group ID of the given entity (10 ops)
Is the entity being held by a player? (10 ops)
Is the entity on fire? (10 ops)
Is the entity a weapon? (10 ops)
Is the entity frozen? (10 ops)
Is the entity asleep? (10 ops)
Is gravity enabled for the entity? (10 ops)
Is the entity penetrating another entity? (10 ops)
Applies force to the entity according to the given vector's direction and magnitude (30 ops)
Applies force to the entity according to the first vector from the location of the second (30 ops)
Applies torque to the entity according to the given angle (30 ops)
Applies torque to the entity according to the given vector, representing the torque axis, magnitude and direction (30 ops)
Gets the principal components of the entity's inertia tensor in the form ( Ixx, Iyy, Izz ) (30 ops)
1 locks and 0 unlocks the vehicle (10 ops)
Kills player in vehicle (10 ops)
Ejects player in vehicle (10 ops)
Strips player in vehicle (10 ops)
Gets the dimensions of the entity's bounding box as a vector (length, width, height) (10 ops)
Gets the center of the entity's bounding box, as a local position vector (10 ops)
Same as using E:toWorld(E:boxCenter()), but since Lua is faster, this is more efficient (also shorter to write) (10 ops)
Gets the maximum local XYZ of the entity's bounding box (the "highest" corner), as a local position vector (10 ops)
Gets the minimum local XYZ of the entity's bounding box (the "lowest" corner), as a local position vector (10 ops)
Returns the entity's (min) axis-aligned bounding box (10 ops)
Returns the entity's (max) axis-aligned bounding box (10 ops)
Returns the entity's axis-aligned bounding box size (10 ops)
Returns the rotated entity's min world-axis-aligned bounding box corner (10 ops)
Returns the rotated entity's max world-axis-aligned bounding box corner (10 ops)
Returns the rotated entity's world-axis-aligned bounding box size (10 ops)
Returns the driver of the vehicle if there is one, nil otherwise (5 ops)
Returns the passenger of the vehicle if there is one, in single seat pods this will return the driver (5 ops)
Converts entity to string (5 ops)
Converts entity to string (5 ops)
Removes the trail from E (50 ops)
StartSize, EndSize, Length, Material, Color (RGB), Alpha. Sets entity's trails with the specified attributes (75 ops)
StartSize, EndSize, Length, Material, Color (RGBA). Sets entity's trails with the specified attributes (75 ops)
StartSize, EndSize, Length, Material. Sets entity's trails with the specified attributes (75 ops)
StartSize, EndSize, Length, Material, Color (RGB), Alpha, AttachmentID, Additive. Sets entity's trails with the specified attributes (75 ops)
Returns how many more entities can have trails (2 ops)
Returns how many entities currently have trails (2 ops)
Returns the maximum amount of entities that can have trails at the same time (Beware, the limit is shared between different chips!) (1 ops)
Returns Es attachment ID associated with attachmentName (15 ops)
Returns Es attachment position associated with attachmentID (15 ops)
Returns Es attachment angle associated with attachmentID (15 ops)
Same as E:attachmentPos(E:lookupAttachment(attachmentName)) (15 ops)
Same as E:attachmentAng(E:lookupAttachment(attachmentName)) (15 ops)
Returns array of attachment names of the entity (20 ops)
Returns the closest point on the edge of the entity's bounding box to the given vector (15 ops)
Ignites an entity for 360 seconds (same as C menu). Requires wire_expression2_entity_ignite_enabled (15 ops)
Ignites an entity for the given length in seconds. Requires wire_expression2_entity_ignite_enabled (15 ops)
Creates a fire at an entity with given radius and length in seconds. Requires wire_expression2_entity_ignite_enabled (15 ops)
Extinguishes an entity granted you have permission. Does not work inside of entityDamage event if the attacker is the fire itself (15 ops)
Returns the collision group of the entity (15 ops)
Sets the collision group of the entity. Does not work on players. Use one of the _COLLISION_GROUP constants (15 ops)
(15 ops)
(5 ops)
Gets the number of flexes on the entity (5 ops)
Gets the flex ID of the given name or -1 if it doesn't exist (5 ops)
Gets the flex scale of the entity (5 ops)
Gets the name of the flex (5 ops)
(5 ops)
Returns 1 if the entity has flexes (5 ops)
(15 ops)
(15 ops)
Gets a 0-indexed array of all flexes and their names (50 ops)
Gets the number of bones on the entity's model. Note these are different from E2 bones (5 ops)
Gets the bone index of the given name or -1 if it doesn't exist (5 ops)
Gets the name of the bone (5 ops)
Gets a 0-indexed array of all bones and their names. Note these are different from E2 bones (50 ops)
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.
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
Disabled by default: constraintcore, effects, propcore, remoteupload, wiring
Wire-Extras (repo): camera, ftrace, holoanim, light, stcontrol, tracesystem
Expression 2 ⚙️
- Syntax 🔣
- Directives 🎛️
- Editor 🖥️
- Ops 📊
- Learning & Getting Help 📚
- Triggers ⏲️
- Events 🎬
- Find Functions 🔍
- Physics 🚀
- EGP Basics 📈
- Lambdas λ
- Lambda Timers λ⏲️
- Tips & Tricks 📘
Click To Expand
- 🟥 SPU
- 🟥 Address Bus
- 🟥 Extended Bus
- 🟥 Plug/Socket
- 🟥 Port
- 🟥 Transfer Bus
- 🟩 GPU
- 🟥 Dynamic Memory
- 🟥 Flash EEPROM
- 🟥 ROM
- 🟧 Beacon Sensor
- 🟧 Locator
- 🟧 Target Finder
- 🟧 Waypoint
- 🟥 XYZ Beacon
- 🟩 CPU
- 🟩 Expression 2
- 🟩 Gates
- 🟥 PID
- 🟧 CD Disk
- 🟥 CD Ray
- 🟧 DHDD
- 🟥 Keycard
- 🟥 RAM-card
- 🟧 Satellite Dish
- 🟧 Store
- 🟧 Transferer
- 🟥 Wired Wirer
- 🟧 Adv Entity Marker
- 🟧 Damage Detector
- 🟧 Entity Marker
- 🟧 GPS
- 🟧 Gyroscope
- 🟥 HighSpeed Ranger
- 🟧 Laser Pointer Receiver
- 🟥 Microphone
- 🟧 Ranger
- 🟧 Speedometer
- 🟧 Water Sensor
- 🟧 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
- 🟩 Cam Controller
- 🟧 Colorer
- 🟧 FX Emitter
- 🟧 HighSpeed Holoemitter
- 🟧 HoloEmitter
- 🟧 HoloGrid
- 🟥 Interactable Holography Emitter
- 🟥 Materializer
- 🟥 Painter
- 🟧 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
- 🟥 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
- 🟧 Debugger
- 🟥 GUI Wiring
- 🟥 Multi Wire
- 🟧 Namer
- 🟥 Simulate Data
- 🟩 Wiring
- 🟥 Beam Reader
- 🟥 Implanter
- 🟥 Reader
- 🟥 Target Filter
- 🟥 User Reader
Gates 🚥
Click To Expand
TBD