e2 docs egpobjects - wiremod/wire GitHub Wiki
Egpobjects
Arguments)
Egpobject = Egpobject:modify(Modifies an object with the provided arguments. (10 ops)
Order)
Egpobject:setOrder(Sets the order at which the object will be rendered. This is different from index (15 ops)
= Egpobject:getOrder()
Returns the order at which the object is rendered (15 ops)
Egpobject:setOrderAbove(Egpobject Abovethis)
Makes the object render above the object (15 ops)
Egpobject:setOrderBelow(Egpobject Belowthis)
Makes the object render below the object (15 ops)
Text)
Egpobject:setText(Changes the text of the text object (7 ops)
Text,
Font,
Size)
Egpobject:setText(Changes the text, font, and text size of the text object (7 ops)
Halign)
Egpobject:setAlign(Changes the horizontal alignment. Works on: text and text layout. Number can be 0, 1 or 2 (7 ops)
Halign,
Valign)
Egpobject:setAlign(Changes the horizontal and vertical alignment. Works on: text and text layout. Numbers can be 0, 1 or 2 (7 ops)
Filtering)
Egpobject:setFiltering(Changes the texture filter used to draw the object. Works on objects that draw a material. See _TEXFILTER constants (POINT=sharp, ANISOTROPIC=blurry/default) (7 ops)
Font)
Egpobject:setFont(Changes the font of the text object (7 ops)
Font,
Size)
Egpobject:setFont(Changes the font and size of the text object (7 ops)
Pos)
Egpobject:setPos(Changes the world position of the 3D tracker object (10 ops)
Size)
Egpobject:setSize(Changes the width and height of an object (7 ops)
Width,
Height)
Egpobject:setSize(Changes the width and height of an object (7 ops)
Size)
Egpobject:setSize(Changes the size of the text/line/outline object (7 ops)
Pos)
Egpobject:setPos(Changes the position of the object (7 ops)
X,
Y)
Egpobject:setPos(Changes the position of the object (7 ops)
X,
Y,
X2,
Y2)
Egpobject:setPos(Changes the position of the start and end of a line object, otherwise acts normally. (7 ops)
Angle)
Egpobject:setAngle(Changes the angle of the object (7 ops)
X,
Y,
Angle)
Egpobject:setPos(Changes the position and angle of the object (7 ops)
Worldpos,
Axispos,
Angle)
Egpobject:rotateAroundAxis(Rotates the object around the first vec2 with the second vec2 as offset at angle N (7 ops)
Verts)
Egpobject:setVertices((7 ops)
Egpobject:setVertices(...)
(7 ops)
Color)
Egpobject:setColor(Changes the color and alpha of the object (7 ops)
Color)
Egpobject:setColor(Changes the color of the object (7 ops)
R,
G,
B,
A)
Egpobject:setColor(Changes the color and alpha of the object (7 ops)
A)
Egpobject:setAlpha(Changes the alpha (transparency) of an object (7 ops)
Material)
Egpobject:setMaterial(Changes the material of the object (7 ops)
Gpu)
Egpobject:setMaterialFromScreen(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 (7 ops)
Fidelity)
Egpobject:setFidelity(Changes the fidelity of the object (the number of vertices the circle will use) (7 ops)
= Egpobject:getFidelity()
Returns the fidelity of the object (7 ops)
Egpobject:parentTo(Egpobject Parent)
Parents the object to another object. Parented objects' positions are local to their parent (7 ops)
Parentindex)
Egpobject:parentTo(Parents the object to another object. Parented objects' positions are local to their parent (7 ops)
:egpParent(Egpobject Child, Egpobject Parent)
Parents the object to another object. Parented objects' positions are local to their parent (7 ops)
Parent)
Egpobject:trackerParent(Parents the 3D tracker object to an entity (7 ops)
= Egpobject:trackerParent()
Returns the parent entity of the 3D tracker object. (7 ops)
Egpobject:parentToCursor()
Parents the object to player's cursor (7 ops)
Egpobject:unparent()
Un-parents the object (7 ops)
= Egpobject:parentIndex()
Returns the index of the parent object (7 ops)
Egpobject = Egpobject:parent()
Returns the parent object (7 ops)
:egpRemove(Egpobject Obj)
(7 ops)
Egpobject:remove()
Removes the object from the screen (7 ops)
Egpobject:draw()
Shows a hidden EGP object. (7 ops)
Egpobject:hide()
Removes an object from the screen but keeps its data intact. (7 ops)
= Egpobject:isVisible()
Returns 1 if the object is visible. (7 ops)
= Egpobject:globalPos()
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)
= Egpobject:globalVertices()
Returns an array of 2D vectors with the "global" positions of the vertices in the object (20 ops)
=
:egpHasObject(Egpobject Object)
Returns 1 if the object exists on the screen, 0 if not (20 ops)
= Egpobject:getPos()
Returns the position of the object (3 ops)
= Egpobject:getPosAng()
Returns the position (x, y) and angle (z) of the object (3 ops)
= Egpobject:getSize()
Returns the size of the object (3 ops)
= Egpobject:getSizeNum()
Returns the size of the text/line/outline object (3 ops)
= Egpobject:getColor4()
Returns the color of the object as a vector4 (3 ops)
= Egpobject:getColor()
Returns the color of the object as a vector (3 ops)
= Egpobject:getAlpha()
Returns the alpha of the object (3 ops)
= Egpobject:getAngle()
Returns the angle of the object (3 ops)
= Egpobject:getMaterial()
Returns the material of the object. Note this does not return anything when using a GPU material (3 ops)
= Egpobject:getRadius()
Returns the radius of the object (3 ops)
= Egpobject:getVertices()
Returns an array of the vertices of the object (10 ops)
= Egpobject:getObjectType()
Returns the type of the object (4 ops)
:egpCopy(
Index, Egpobject From)
Egpobject = (15 ops)
Egpobject:copyFrom(Egpobject From)
Copies the settings of the second object into the first. If the first object does not exist, it's created (15 ops)
= Egpobject:containsPoint(
Point)
Returns 1 if the object contains the specified point (10 ops)
:egpobject(
Index)
Egpobject = Returns the EGPObject at the index (5 ops)
Egpobject = noegpobject()
(1 ops)
= toString(Egpobject Egpo)
Returns a string representation of the EGPObject (1 ops)
= Egpobject:toString()
Returns a string representation of the EGPObject (1 ops)
:egpTextLayout(
Index,
Args)
Egpobject = (10 ops)
:egpLineStrip(
Index,
Args)
Egpobject = (10 ops)
:egpCircleOutline(
Index,
Args)
Egpobject = (10 ops)
:egpLine(
Index,
Args)
Egpobject = (10 ops)
:egpBox(
Index,
Args)
Egpobject = (10 ops)
:egpBoxOutline(
Index,
Args)
Egpobject = (10 ops)
:egp3DTracker(
Index,
Args)
Egpobject = (10 ops)
:egpCircle(
Index,
Args)
Egpobject = (10 ops)
:egpRoundedBoxOutline(
Index,
Args)
Egpobject = (10 ops)
:egpPoly(
Index,
Args)
Egpobject = (10 ops)
:egpPolyOutline(
Index,
Args)
Egpobject = (10 ops)
:egpRoundedBox(
Index,
Args)
Egpobject = (10 ops)
:egpWedgeOutline(
Index,
Args)
Egpobject = (10 ops)
:egpWedge(
Index,
Args)
Egpobject = (10 ops)
:egpText(
Index,
Args)
Egpobject = (10 ops)