Browsing Wiremod's section
← Back to ACE
🔁

Mirrored article

This page is synced automatically from the wiremod/wire GitHub wiki (last synced 1 hour ago). Edits made here will be overwritten on the next sync — contribute on the source wiki instead.

Expression 2 Core

Expression 2 Core

📄 WikiUpdated 1 hour ago•0 views
Expression 2: Core Functions Function Returns Description first() Returns 1 if the expression was spawned or reset duped() Returns 1 if the expression was duplicated dupefinished() Returns 1 when the

Expression 2: Core Functions

Function
Returns
Description

first()

Returns 1 if the expression was spawned or reset

duped()

Returns 1 if the expression was duplicated

dupefinished()

Returns 1 when the contraption has finished duping. (Only triggers on Adv Duplicator, not the normal duplicator)

inputClk()

Returns 1 if the expression was triggered by an input

reset()

Reset the expression itself as if it was just spawned, stops execution

exit()

Stops the execution of any code after it

runOnLast( )

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.

last()

Returns 1 if this is the last execution.

removing()

Returns 1 if this is the last() execution and caused by the entity being removed.

ops()

Returns how many ops are used every execution on average

cpuUsage()

Returns the average cpu usage in seconds. Multiply it by 1000000 to get the same number you see in E2 's overlay text.

opcounter()

Returns how many ops have been used so far in this execution plus the amount of hard quota used

minquota()

The ops left before soft quota is used up

maxquota()

The ops left before hard quota is exceeded and the expression shuts down

softQuota()

Returns the size of the soft quota

hardQuota()

Returns the size of the hard quota

perf()

If used as a while loop condition, stabilizes the expression around <maxexceed></maxexceed> hardquota used.

perf( )

Same as perf() , where is the percentage of the soft quota the E2 will stabilise at.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.