-
Notifications
You must be signed in to change notification settings - Fork 333
Prop core
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.
All the function descriptions are available in the table below:
Instance creator | Out | Description |
---|---|---|
propSpawn (,,) |
Rotation, Frozen Spawns a prop with the model of the template entity and rotated to the angle given. If frozen is 0 , then it will spawn unfrozen. |
|
propSpawn (,) |
Entity template, Frozen Spawns a prop with the model of the template entity. If frozen is 0 , then it will spawn unfrozen. |
|
propSpawn (,,,) |
Position, Rotation, Frozen Spawns a prop with the model of the template entity, at the position denoted by the vector, and rotated to the angle given. If frozen is 0 , then it will spawn unfrozen. |
|
propSpawn (,,) |
Entity template, Position, Frozen Spawns a prop with the model of the template entity at the position denoted by the vector. If frozen is 0 , then it will spawn unfrozen. |
|
propSpawn (,,) |
Model path, Rotation, Frozen Spawns a prop with the model denoted by the string filepath and rotated to the angle given. If frozen is 0 , then it will spawn unfrozen. |
|
propSpawn (,) |
Use the model string or a template entity to spawn a prop. You can set the position and/or the rotation as well. The last number indicates frozen/unfrozen. | |
propSpawn (,,,) |
Model path, Position, Rotation, Frozen Spawns a prop with the model denoted by the string file path, at the position denoted by the vector, and rotated to the angle given. If frozen is 0 , then it will spawn unfrozen. |
|
propSpawn (,,) |
Model path, Position, Frozen Spawns a prop with the model denoted by the string filepath at the position denoted by the vector. If frozen is 0 , then it will spawn unfrozen. |
|
seatSpawn (,) |
Model path, Frozen Spawns a prop with the model denoted by the string filepath. If frozen is 0 , then it will spawn unfrozen. |
|
seatSpawn (,,,) |
Model path, Frozen Spawns a prop with the model denoted by the string filepath. If frozen is 0 , then it will spawn unfrozen. |
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. |
General functions | Out | Description |
---|---|---|
propCanCreate () |
Returns 1 when propSpawn () will successfully spawn a prop until the limit is reached. |
|
:propDelete () |
Deletes all the props in the given array, returns the amount of props deleted. | |
:propDelete () |
Deletes all the props in the given table, returns the amount of props deleted. | |
propDeleteAll () |
Removes all entities spawned by this E2
|
|
propSpawnEffect () |
Set to 1 to enable prop spawn effect, 0 to disable. |
|
propSpawnUndo () |
Set to 0 to force prop removal on E2 shutdown, and suppress Undo entries for props. |
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 λ
- 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