Skip to content

e2 docs egpfunctions

Divran edited this page Aug 5, 2020 · 4 revisions

Table of Contents


Egpfunctions

WireLink:egpSaveFrame(String Index)

Saves the frame under specified name (15 ops)

WireLink:egpSaveFrame(Number Index)

Saves the frame under specified index (15 ops)

WireLink:egpLoadFrame(String Index)

Loads the frame with specified name (15 ops)

WireLink:egpLoadFrame(Number Index)

Loads the frame with specified index (15 ops)

WireLink:egpOrder(Number Index, Number Order)

Sets the order at which the object will be rendered (15 ops)

Number = WireLink:egpOrder(Number Index)

Returns the order at which the object is rendered (15 ops)

WireLink:egpOrderAbove(Number Index, Number Abovethis)

(15 ops)

WireLink:egpOrderBelow(Number Index, Number Belowthis)

(15 ops)

WireLink:egpBox(Number Index, Vector2 Pos, Vector2 Size)

Creates a box. First 2D vector is the position, second is size (15 ops)

WireLink:egpBoxOutline(Number Index, Vector2 Pos, Vector2 Size)

Creates an outline box. First 2D vector is the position, second is size (15 ops)

WireLink:egpRoundedBox(Number Index, Vector2 Pos, Vector2 Size)

Creates a rounded box. First 2D vector is the position, second is size (15 ops)

WireLink:egpRadius(Number Index, Number Radius)

Changes the corner radius of the rounded box object (15 ops)

WireLink:egpRoundedBoxOutline(Number Index, Vector2 Pos, Vector2 Size)

Creates a rounded outline box. First 2D vector is the position, second is size (15 ops)

WireLink:egpText(Number Index, String Text, Vector2 Pos)

Creates a text object (15 ops)

WireLink:egpTextLayout(Number Index, String Text, Vector2 Pos, Vector2 Size)

Creates a text layout object (15 ops)

WireLink:egpSetText(Number Index, String Text)

Changes the text of the text object (10 ops)

WireLink:egpAlign(Number Index, Number Halign)

Changes the horizontal alignment. Works on: text and text layout. Number can be 0, 1 or 2 (10 ops)

WireLink:egpAlign(Number Index, Number Halign, Number Valign)

Changes the horizontal and vertical alignment. Works on: text and text layout. Numbers can be 0, 1 or 2 (10 ops)

WireLink:egpFiltering(Number Index, Number Filtering)

Changes the texture filter used to draw the object. Works on objects that draw a material. See _TEXFILTER constants (POINT=sharp, ANISOTROPIC=blurry/default) (10 ops)

WireLink:egpGlobalFiltering(Number Filtering)

Changes the texture filter used to draw all EGP Objects. Works only on EGP Screens. See _TEXFILTER constants (POINT=sharp, ANISOTROPIC=blurry/default) (10 ops)

WireLink:egpFont(Number Index, String Font)

Changes the font of the text object (10 ops)

WireLink:egpFont(Number Index, String Font, Number Size)

Changes the font and size of the text object (10 ops)

WireLink:egpPoly(Number Index, ...)

Creates a polygon with specified points as 2D/4D vectors (x,y)/(x,y,u,v) (20 ops)

WireLink:egpPoly(Number Index, Array Args)

Creates a polygon with specified points as array of 2D/4D vectors (x,y)/(x,y,u,v) (20 ops)

WireLink:egpPolyOutline(Number Index, ...)

Creates a outline polygon with specified points as 2D/4D vectors (x,y)/(x,y,u,v) (20 ops)

WireLink:egpPolyOutline(Number Index, Array Args)

Creates a outline polygon with specified points as array of 2D/4D vectors (x,y)/(x,y,u,v) (20 ops)

WireLink:egpAddVertices(Number Index, Array Args)

(20 ops)

WireLink:egpLineStrip(Number Index, ...)

Creates a curve with specified points as 2D/4D vectors (x,y)/(x,y,u,v) (20 ops)

WireLink:egpLineStrip(Number Index, Array Args)

Creates a curve with specified points as array of 2D/4D vectors (x,y)/(x,y,u,v) (20 ops)

WireLink:egpLine(Number Index, Vector2 Pos1, Vector2 Pos2)

Creates a line. First 2D vector is the start position, second is end position (15 ops)

WireLink:egpCircle(Number Index, Vector2 Pos, Vector2 Size)

Creates a circle. First 2D vector is the position, second is size (15 ops)

WireLink:egpCircleOutline(Number Index, Vector2 Pos, Vector2 Size)

Creates an outline circle. First 2D vector is the position, second is size (15 ops)

WireLink:egpTriangle(Number Index, Vector2 V1, Vector2 V2, Vector2 V3)

Creates a triangle with specified vertices (15 ops)

WireLink:egpTriangleOutline(Number Index, Vector2 V1, Vector2 V2, Vector2 V3)

Creates a outline triangle with specified vertices (15 ops)

WireLink:egpWedge(Number Index, Vector2 Pos, Vector2 Size)

Creates a wedge object. Wedge objects are like circles, except they have a cake-piece-like mouth which you can change using egpSize (15 ops)

WireLink:egpWedgeOutline(Number Index, Vector2 Pos, Vector2 Size)

Creates a outline wedge object. Wedge objects are like circles, except they have a cake-piece-like mouth which you can change using egpSize (15 ops)

WireLink:egp3DTracker(Number Index, Vector Pos)

Creates a 3D tracker object at specified world position (15 ops)

WireLink:egpPos(Number Index, Vector Pos)

Changes the world position of the 3D tracker object (10 ops)

WireLink:egpSize(Number Index, Vector2 Size)

Changes the size of the object (10 ops)

WireLink:egpSize(Number Index, Number Size)

Changes the size of the text/line/outline object (10 ops)

WireLink:egpPos(Number Index, Vector2 Pos)

Changes the position of the object (10 ops)

WireLink:egpAngle(Number Index, Number Angle)

Changes the angle of the object (10 ops)

WireLink:egpAngle(Number Index, Vector2 Worldpos, Vector2 Axispos, Number Angle)

Rotates the object around the first vec2 with the second vec2 as offset at angle N (10 ops)

WireLink:egpColor(Number Index, Vector4 Color)

Changes the color and alpha of the object (10 ops)

WireLink:egpColor(Number Index, Vector Color)

Changes the color of the object (10 ops)

WireLink:egpColor(Number Index, Number R, Number G, Number B, Number A)

Changes the color and alpha of the object (10 ops)

WireLink:egpAlpha(Number Index, Number A)

Changes the alpha (transparency) of an object (10 ops)

WireLink:egpMaterial(Number Index, String Material)

Changes the material of the object (10 ops)

WireLink:egpMaterialFromScreen(Number Index, Entity Gpu)

Sets the material of the object to a current snapshot of the target screen. Note that this only works for players which see both the egp as well the target screen at that time (10 ops)

WireLink:egpFidelity(Number Index, Number Fidelity)

Changes the fidelity of the object (the number of vertices the circle will use) (10 ops)

Number = WireLink:egpFidelity(Number Index)

Returns the fidelity of the object (10 ops)

WireLink:egpParent(Number Index, Number Parentindex)

Parents the object to another object. Parented objects' positions are local to their parent (10 ops)

WireLink:egpParent(Number Index, Entity Parent)

Parents the 3D tracker object to an entity (10 ops)

Entity = WireLink:egpTrackerParent(Number Index)

Returns the parent entity of the 3D tracker object (10 ops)

WireLink:egpParentToCursor(Number Index)

Parents the object to player's cursor (10 ops)

WireLink:egpUnParent(Number Index)

Un-parents the object (10 ops)

Number = WireLink:egpParent(Number Index)

Returns the index of the parent object (10 ops)

WireLink:egpClear()

Clears the EGP screen (10 ops)

WireLink:egpRemove(Number Index)

Removes the object from the screen (10 ops)

Vector2 = WireLink:egpPos(Number Index)

Returns the position of the object (5 ops)

Vector = WireLink:egpGlobalPos(Number Index)

Returns the "global" (= it takes the parents' positions into consideration) position as a 3D vector. X and Y being the 2D X,Y coordinates, while Z is the angle (20 ops)

Array = WireLink:egpGlobalVertices(Number Index)

Returns an array of 2D vectors with the "global" positions of the vertices in the object (20 ops)

Vector2 = WireLink:egpSize(Number Index)

Returns the size of the object (5 ops)

Number = WireLink:egpSizeNum(Number Index)

Returns the size of the text/line/outline object (5 ops)

Vector4 = WireLink:egpColor4(Number Index)

Returns the color of the object as 4D vector (including alpha) (5 ops)

Vector = WireLink:egpColor(Number Index)

Returns the color of the object as 3D vector (5 ops)

Number = WireLink:egpAlpha(Number Index)

Returns the alpha of the object (5 ops)

Number = WireLink:egpAngle(Number Index)

Returns the angle of the object (5 ops)

String = WireLink:egpMaterial(Number Index)

Returns the material of the object (5 ops)

Number = WireLink:egpRadius(Number Index)

Returns the corcner radius of the rounded box object (5 ops)

Array = WireLink:egpVertices(Number Index)

Returns an array of the vertices of the object (10 ops)

Array = WireLink:egpObjectIndexes()

Returns an array containing all object indexes being used (1 ops)

Array = WireLink:egpObjectTypes()

Returns an array whose keys are bound to object index, and value being the type of particular object (1 ops)

String = WireLink:egpObjectType(Number Index)

Returns the type of the object with specified index (10 ops)

WireLink:egpCopy(Number Index, Number Fromindex)

Copies the settings of the second object into the first. If the first object does not exist, it's created (15 ops)

Vector2 = WireLink:egpCursor(Entity Ply)

Returns the specified player's aim position on the screen (20 ops)

Vector2 = egpScrSize(Entity Ply)

Returns the player's screen resolution size (10 ops)

Number = egpScrW(Entity Ply)

Returns the player's screen resolution width (10 ops)

Number = egpScrH(Entity Ply)

Returns the player's screen resolution height (10 ops)

Number = WireLink:egpHasObject(Number Index)

Returns 1 if the object with specified index exists on the screen, 0 if not (15 ops)

Number = WireLink:egpObjectContainsPoint(Number Index, Vector2 Point)

Returns 1 if the object with specified index contains the specified point (15 ops)

WireLink:egpScale(Vector2 Xscale, Vector2 Yscale)

Sets the scale of the screen's X axis to the first vector and Y axis to the second vector (10 ops)

WireLink:egpResolution(Vector2 Topleft, Vector2 Bottomright)

Sets the scale of the screen such that the top left corner is equal to the first vector and the bottom right corner is equal to the second vector (10 ops)

Vector2 = WireLink:egpOrigin()

(10 ops)

Vector2 = WireLink:egpSize()

(10 ops)

WireLink:egpDrawTopLeft(Number Onoff)

Set to 1 to make boxes, outline boxes, rounded boxes, and rounded outline boxes draw from the top left corner instead of from the center (10 ops)

Vector = WireLink:egpToWorld(Vector2 Pos)

Converts a 2D vector on the screen or emitter into a 3D vector in the world (20 ops)

WireLink:egpHudToggle()

Toggles the HUD on/off (25 ops)

Number = WireLink:egpNumObjects()

Returns the number of objects on the screen (10 ops)

Number = egpMaxObjects()

Returns the maximum amount of objects you can have (10 ops)

Number = egpMaxUmsgPerSecond()

Returns the maximum number of usermessages you can send per second (10 ops)

Number = egpBytesLeft()

(10 ops)

Number = egpCanSendUmsg()

Returns 1 if you can send an usermessage at the moment, 0 otherwise (5 ops)

Number = egpClearQueue()

Clears your entire queue (5 ops)

Number = egpQueue()

Returns the number of items in your queue (10 ops)

WireLink:egpRunOnQueue(Number Yesno)

Set to 1 if you want your E2 to be triggered once the queue has finished sending all items in the queue for the screen (10 ops)

Number = egpQueueClk()

Returns 1 if the current execution was caused by the EGP queue system (10 ops)

Number = egpQueueClk(WireLink Screen)

Returns 1 if the current execution was caused by the EGP queue system of specified screen (10 ops)

Number = egpQueueClk(Entity Screen)

Returns 1 if the current execution was caused by the EGP queue system of specified screen (10 ops)

Entity = egpQueueScreen()

Returns the screen entity which the queue finished sending items for (10 ops)

WireLink = egpQueueScreenWirelink()

Returns the screen wirelink which the queue finished sending items for (10 ops)

Entity = egpQueuePlayer()

Returns the player which ordered the items to be sent (10 ops)

Number = egpQueueClkPly(Entity Ply)

Returns 1 if the current execution was caused by the EGP queue system, and the player E was the player who ordered the items to be sent (10 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