e2 docs core - wiremod/wire GitHub Wiki
Core
= first()
Returns 1 if the expression was spawned or reset (1 ops)
= duped()
Returns 1 if the expression was duplicated (1 ops)
= inputClk()
Returns 1 if the expression was triggered by an input (1 ops)
= inputClkName()
(1 ops)
= last()
Returns 1 if it is being called on the last execution of the expression gate before it is removed or reset. This execution must be requested with the runOnLast(1) command (1 ops)
= dupefinished()
Returns 1 when the contraption has finished duping. (1 ops)
= removing()
Returns 1 if this is the last() execution and caused by the entity being removed (1 ops)
Activate)
runOnLast(If set to 1, the chip will run once when it is removed, setting the last() flag when it does (1 ops)
exit()
Stops the execution of any code after it (2 ops)
Reason)
error(Shuts down the E2 with specified script error message (2 ops)
Condition)
assert(If the argument is 0, shut down the E2 with an error message (2 ops)
Condition,
Reason)
assert(If the first argument is 0, shut down the E2 with the given error message string (2 ops)
reset()
Reset the expression itself as if it was just spawned, stops execution (100 ops)
= ops()
Returns how many ops are used every execution on average (1 ops)
=
:ops()
(1 ops)
= opcounter()
Returns how many ops have been used so far in this execution plus the amount of hard quota used (1 ops)
= cpuUsage()
Returns the average time per tick the server spends running this E2, in seconds (multiply it by 1000000 to get the same value as is displayed on the E2 overlay) (1 ops)
=
:cpuUsage()
Returns the average time per tick the server spends running the specified E2, in seconds (multiply it by 1000000 to get the same value as is displayed on the E2 overlay) (1 ops)
= perf()
If used as a while loop condition, stabilizes the expression around hardquota used (1 ops)
= perf(
N)
If used as a while loop condition, stabilizes the expression around specified number (in %) (1 ops)
= minquota()
The ops left before soft quota is used up (1 ops)
= maxquota()
The ops left before hard quota is exceeded and the expression shuts down (1 ops)
= softQuota()
Returns the size of the soft quota (1 ops)
= hardQuota()
Returns the size of the hard quota (1 ops)
= timeQuota()
Returns the time quota in seconds (1 ops)
Index, Gtable Argument1, ...)
Gtable = select(Returns the Nth value given after the index, gtable's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, wirelink's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, ranger's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, complex's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
Index, Tracedata Argument1, ...)
Tracedata = select(Returns the Nth value given after the index, tracedata's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
Index, Effect Argument1, ...)
Effect = select(Returns the Nth value given after the index, effect's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, string's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, array's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, vector2's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, entity's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, matrix's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, table's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, vector's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, matrix4's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, vector4's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, matrix2's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, number's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
Index, Stcontrol Argument1, ...)
Stcontrol = select(Returns the Nth value given after the index, stcontrol's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, bone's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
Index, Ftrace Argument1, ...)
Ftrace = select(Returns the Nth value given after the index, ftrace's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, quaternion's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)
= select(
Index,
Argument1, ...)
Returns the Nth value given after the index, angle's zero element otherwise. If you mix types, the behaviour is undefined (5 ops)