Classic triggers have no variables, so you borrowed death counters. eudplib has real ones.
| EUDVariable(initval) | The standard variable. It can be dropped into a condition or action wherever a number goes. |
|---|---|
| EUDCreateVariables(varn) | Create several at once. |
| EUDLightVariable(initvalue) | A 4-byte lightweight variable, essentially a death value. Rarely needed. |
| IsEUDVariable(x) | Test whether x is an EUDVariable. |
| SeqCompute(assignpairs) | Perform several assignments in the order written. |
| SetVariables(srclist, dstlist, mdtlist) | A shorthand for SeqCompute. |
| VProc(v, actions) | Run actions against a variable. Advanced. |
initval is the starting value, not a value it returns to. Once changed it stays changed - so an if that tests the initial value runs only once.
| EUDFunc | A decorator that turns a function into an EUD function. |
|---|---|
| EUDTypedFunc(argtypes, rettypes) | The same with types on the arguments and return values. |
| EUDFuncPtr(argn, retn) | A pointer to an EUD function, and it can be repointed. |
| EUDTypedFuncPtr(argtypes, rettypes) | A typed function pointer. |
| EUDMethod / EUDTypedMethod | The same idea for methods on a struct. |
| EUDReturn() | Return a value. Required once a function has more than one return. |
| EUDFuncN(argn, callerfunc, bodyfunc) | The underlying type of every EUD function. |
There are two ways to initialise an array that look the same and cost completely different things. EUDArray(list(1, 2, 3, 4)) is baked in at compile time and emits zero triggers; [1, 2, 3, 4] runs code at that line to fill the array. A constant array written with brackets inside a function that runs every cycle pays that cost every cycle.
| EUDArray(initval) | The basic array. For values that never change, pass them as EUDArray(list(...)). |
|---|---|
| EUDVArray() | A variable-backed array; faster than EUDArray for constant indices. |
| EUDStruct(initvar) | Define a structure, listing its fields in _fields_. |
| EUDStack(size, basetype) | A stack implementation that ships with eudplib. |
| ObjPool(size, basetype) | A pool of pre-allocated structures handed out on request. |
| selftype | Used when a struct field is of the struct's own type. |
| unProxy(x) | Strip the type wrappers off a value, for comparison. |
| Db(b) | Place raw binary data into memory. |
| EUDGrp(content) | For GRP graphics data. |
A struct inside a struct stores a pointer, not the value - the same model as Python or Java.
