Skip to content

Expression 2 Directives

Vurv edited this page Jun 18, 2022 · 8 revisions

@name

@name My E2 Chip

@inputs

@inputs X Y:string [Z W]:number

@outputs

@outputs X Y:string [Z W]:number

@persist

@persist X Y:string [Z W]:number

@trigger

The trigger directive can selectively enable or disable inputs from triggering executions. Possible values are all/none, but also a list of inputs.

@trigger all
# or
@trigger X Y

@model

@model path/to/prop/model

@autoupdate

Using the autoupdate directive will enable auto updating. What this means is that whenever you paste a duplication of an E2 with autoupdate enabled, the E2 will check your files for a new version of that E2 and upload it. Note:

  • Only works on saved E2s.
  • To disable autoupdate, simply don't write @autoupdate
  • If you for some reason need to get an old version of your E2 from a dupe, you will have to temporarily change the name of your E2 so that the autoupdate feature doesn't find the file. Then it'll silently fail and leave you with the old code.
@autoupdate

@strict

The strict directive tells the E2 whether to report undefined or incorrect behavior in E2. For example if you try to applyForce a NULL / Invalid Entity / Prop that does not exist, it will warn you rather than do nothing. This is useful for debugging and generally to keep your E2 efficient and safe. It is not enabled by default as to keep backwards compatibility with old E2s.

@strict

Expression 2 ⚙️

Getting Started 🕊

Guides (In learning order) 🎓

Tools 🛠️

Click To Expand

Advanced

Beacon 💡

Control 🎛️

Data 💿

Detection 👀

Display 💻

Render 🖌

I/O 🔌

Physics 🚀

Utilities 🛠️

RFID 💳

Wireless 🛜

Gates 🚥

Click To Expand

TBD

Extras 🔭

Clone this wiki locally