Skip to content

e2 docs custom effects

Divran edited this page Apr 22, 2021 · 3 revisions

Jump to table of contents

Custom/effects

Effect = effect()

Creates and returns new effect (1 ops)

Effect = Effect:setOrigin(Vector Pos)

Sets the origin of the effect (1 ops)

Effect = Effect:setStart(Vector Pos)

Sets the start of the effect (1 ops)

Effect = Effect:setMagnitude(Number Mag)

Sets the magnitude of the effect (1 ops)

Effect = Effect:setAngles(Angle Ang)

Sets the angle of the effect (1 ops)

Effect = Effect:setScale(Number Scale)

Sets the scale of the effect (1 ops)

Effect = Effect:setEntity(Entity Ent)

Sets the entity of the effect (1 ops)

Effect = Effect:setNormal(Vector Norm)

Sets the normalized direction vector of the effect (1 ops)

Effect = Effect:setSurfaceProp(Number Prop)

Sets the surface property index of the effect (1 ops)

Effect = Effect:setRadius(Number Radius)

Sets the radius of the effect (1 ops)

Effect = Effect:setMaterialIndex(Number Index)

Sets the material index of the effect (1 ops)

Effect = Effect:setHitBox(Number Index)

Sets the hit box index of the effect (1 ops)

Effect = Effect:setFlags(Number Flags)

Sets the flags of the effect (1 ops)

Effect = Effect:setEntIndex(Number Index)

Sets the entity of the effect via its index (1 ops)

Effect = Effect:setDamageType(Number Index)

Sets the damage type of the effect. See DMG_ Enums on GMod Wiki (1 ops)

Effect = Effect:setColor(Number Index)

Sets the color of the effect. Color is represented by a byte (1 ops)

Effect = Effect:setAttachment(Number Index)

Creates new attachment ID for the effect (1 ops)

Effect:play(String Name)

Plays the effect with given name (eg. watersplash) (1 ops)

Expression 2 ⚛️

Tutorials (In learning order) 🎓

Extras ❔

Tools 🛠️

Click To Expand

Advanced

Beacon 💡

Control 🎛️

Data 💿

Detection 👀

Display 💻

Render

I/O 🔌

Physics 🚀

Utilities 🛠️

RFID

Wireless 🛜

Gates 🚥

Click To Expand

TBD

Clone this wiki locally