Table of Contents
Description
The prop core functionality is used generally for manipulating props using an E2 script within the Garry's mod environment. Manipulation type can be anything like creating, deleting, teleporting, angling, gravity, inertia, buoyancy and much more. The data types are general for the E2 chip and you can find them here!
What console variables can be used to setup it
sbox_E2_maxProps : Controls the maximum amount of props spawned via E2 set this to `-1` to disable the limit.
sbox_E2_maxPropsPerSecond : Controls the maximum amount of props spawned for one second. Don't set this too high!
sbox_E2_PropCore : Controls enable/disable of the extension. Setup values are written below.
0 : The extension is disabled.
1 : Only admins can use the extension.
2 : Players can affect their own props.
Expression 2 API
All the function descriptions are available in the table below:
Prop core method | Out | Description |
---|---|---|
![]() deparent () |
Unparents an entity, so it moves freely again. | |
![]() parentTo () |
Parents one entity to another. | |
![]() parentTo (![]() |
Parents one entity to another. | |
![]() propBreak () |
Breaks/Explodes breakable/explodable props (Useful for Mines). | |
![]() propDelete () |
Deletes the specified prop. | |
![]() propDrag (![]() |
Passing 0 makes the entity not be affected by drag |
|
![]() propDraw (![]() |
Passing 0 disables rendering for the entity (makes it really invisible) |
|
![]() propFreeze (![]() |
Passing 0 unfreezes the entity, everything else freezes it. |
|
![]() propGetElasticity () |
![]() |
Gets prop's elasticity coefficient |
![]() propGetFriction () |
![]() |
Gets prop's friction coefficient |
![]() propGravity (![]() |
Passing 0 makes the entity weightless, everything else makes it weighty. |
|
![]() propInertia (![]() |
Sets the directional inertia | |
![]() propMakePersistent (![]() |
Setting to 1 will make the prop persistent. |
|
![]() propManipulate (![]() ![]() ![]() ![]() ![]() |
Allows to do any single prop core function in one term (position, rotation, freeze, gravity, notsolid) | |
![]() propNotSolid (![]() |
Passing 0 makes the entity solid, everything else makes it non-solid. |
|
![]() propPhysicalMaterial () |
![]() |
Returns the surface material of a prop. |
![]() propPhysicalMaterial (![]() |
Changes the surface material of a prop (eg. wood, metal, ... See Material_surface_properties ). |
|
![]() propSetBuoyancy (![]() |
Sets the prop's buoyancy ratio from 0 to 1 |
|
![]() propSetElasticity (![]() |
Sets prop's elasticity coefficient (default is 1 ) |
|
![]() propSetFriction (![]() |
Sets prop's friction coefficient (default is 1 ) |
|
![]() propSetVelocity (![]() |
Sets the velocity of the prop for the next iteration | |
![]() propSetVelocityInstant (![]() |
Sets the initial velocity of the prop | |
![]() propShadow (![]() |
Passing 0 disables rendering for the entity's shadow |
|
![]() propStatic (![]() |
Sets to 1 to make the entity static (disables movement, physgun, unfreeze, drive...) or 0 to cancel. |
|
![]() reposition (![]() |
Deprecated. Kept for backwards-compatibility. | |
![]() rerotate (![]() |
Deprecated. Kept for backwards-compatibility. | |
![]() setAng (![]() |
Set the rotation of an entity. | |
![]() setPos (![]() |
Sets the position of an entity. | |
![]() use () |
Simulates a player pressing their use key on the entity. |
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