-
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:
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 physics gun enabled 0/1 , freeze 0/1 , gravity toggle 0/1 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 bodygroup 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 |
|
:trackasmlibMakePiece (,,,,,) |
Creates new track piece with position angle, mass, skin code and color as vector alpha as number 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 an array with all surface property types | |
trackasmlibGetProperty () |
Returns the surface properties available for a given type | |
trackasmlibGetPropertyCount () |
Returns how many property types are available | |
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 alpha as numbers by model | |
trackasmlibMakePiece (,,,,,) |
Creates new track piece with position angle, mass, skin code and color as vector alpha is 255 by model |
|
trackasmlibMakePiece (,,,,,,) |
Creates new track piece with position angle, mass, skin code and color as vector alpha by as number model | |
trackasmlibSnapNormal (,,,,,) |
Returns track surface snap position and angle array by position, angle, model, point ID , position offset and angle offset |