-
Notifications
You must be signed in to change notification settings - Fork 2
Wiremod E2 API
The Track assembly tool
Expression 2
API is used for a wrapper of the library functions, which handle the track piece
snapping, so you can call them inside an E2
and thus create your own automatically generated layouts. This also can be
used when you need to implement track switchers, where you just snap
desired track piece to the track end you wish to use.
You can then apply your desired properties, like disable physgun
no-collide
and weld
to make
sure the piece is not going anywhere and it is not generating server collisions.
This list is derived from the Wiremod types wiki located here. Here are all the icons for the data types of this addon summarized in the table below:
Icon | Description |
---|---|
Angle class |
|
Bone class |
|
Complex number |
|
Entity class |
|
Matrix 2x2 |
|
Matrix 3x3 |
|
Matrix 4x4 |
|
Number |
|
Quaternion |
|
Array |
|
String class |
|
Table |
|
Vector 2D class |
|
Vector 3D class |
|
Vactor 4D class |
|
Ranger data class |
|
Wire link class |
|
Flash tracer class |
|
State controller class |
|
Void data type |
For every table, there is a wrapper function that reads the desired data you want:
Class methods | Out | Description |
---|---|---|
:trackasmlibApplyPhysicalAnchor(,,,,) | Anchors the track entity to a base entity with weld 0/1 and no-collide 0/1 no-collide-world 0/1 and force limit. |
|
:trackasmlibApplyPhysicalSettings(,,,) | Modifies track entity physical settings with phys-gun enabled, freeze, gravity toggle and surface material behavior | |
:trackasmlibAttachAdditions() | Attaches the track entity additions when available | |
:trackasmlibAttachBodyGroups() | Attaches track piece body-groups by providing selection code | |
:trackasmlibGenActivePointDSV(,,,,) | Exports the track entity as external database record | |
:trackasmlibGenActivePointINS(,,,,) | Exports the track entity as internal database record | |
:trackasmlibGetAdditionsCount() | Returns record additions count by entity | |
:trackasmlibGetAdditionsLine() | Returns record additions line by entity | |
:trackasmlibGetBodyGroups() | Returns the track bodygoup selection list | |
:trackasmlibGetName() | Returns record name by entity | |
:trackasmlibGetOffset(,) | Returns record snap offsets by entity | |
:trackasmlibGetPointsCount() | Returns record points count by entity | |
:trackasmlibGetSkin() | Returns the track skin selection list | |
:trackasmlibGetType() | Returns record track type by entity | |
:trackasmlibHasAdditions() | Returns 1 when the record has additions and 0 otherwise by entity |
|
:trackasmlibIsPiece() | Returns 1 when the record is actual track and 0 otherwise by entity |
|
:trackasmlibMakePiece(,) | Duplicates the given track using the new position and angle | |
:trackasmlibMakePiece(,,) | Creates new track piece with position angle, mass by entity | |
:trackasmlibMakePiece(,,,) | Creates new track piece with position angle, mass and skin code by entity | |
:trackasmlibMakePiece(,,,,,,,) | Creates new track piece with position angle, mass, skin code, color and alpha as numbers by entity | |
:trackasmlibMakePiece(,,,,) | Creates new track piece with position angle, mass, skin code and color as vector alpha is 255 by entity |
|
:trackasmlibSnapEntity(,,,,,,,) | Returns track entity snap position and angle array by holder model, point ID, active radius, flatten, ignore type, position offset and angle offset |
General functions | Out | Description |
---|---|---|
trackasmlibGetAdditionsCount() | Returns record additions count by model | |
trackasmlibGetAdditionsLine(,) | Returns record additions line by model | |
trackasmlibGetName() | Returns record name by model | |
trackasmlibGetOffset(,,) | Returns record snap offsets by model | |
trackasmlibGetPointsCount() | Returns record points count by model | |
trackasmlibGetProperty() | Returns the surface property types | |
trackasmlibGetProperty() | Returns the surface properties available for a given type | |
trackasmlibGetType() | Returns record track type by model | |
trackasmlibHasAdditions() | Returns 1 when the record has additions and 0 otherwise by model |
|
trackasmlibIsPiece() | Returns 1 when the record is actual track and 0 otherwise by model |
|
trackasmlibMakePiece(,,,) | Creates new track piece with position angle, mass by model | |
trackasmlibMakePiece(,,,,) | Creates new track piece with position angle, mass and skin code by model | |
trackasmlibMakePiece(,,,,,,,,) | Creates new track piece with position angle, mass, skin code and color and aplha as numbers by model | |
trackasmlibMakePiece(,,,,,) | Creates new track piece with position angle, mass, skin code and color as vector alpha is 255 by model |
|
trackasmlibSnapNormal(,,,,,) | Returns track surface snap position and angle array by position, angle, model, point ID, position offset and angle offset |