You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local junctionId = RegisterTrackJunction(onTrack, onNode, newTrack, newNode, direction)
22
+
print(("The junctionId is %s"):format(junctionId))
23
+
24
+
local isValid, _onTrack, _onNode, _newTrack, _newNode, _direction = GetTrackJunctionInfo(junctionId)
25
+
if isValid then
26
+
print(('The junction is valid, on track %i, on node %i, new track %i, new node %i, direction %s'):format(_onTrack, _onNode, _newTrack, _newNode, _direction and 'true' or 'false'))
27
+
else
28
+
print('The junctionId is invalid')
29
+
end
30
+
```
31
+
32
+
## Parameters
33
+
***junctionId**: The track junction handle
34
+
***trackIndex**: The track index a train should be on
35
+
***trackNode**: The node a train should be on
36
+
***newIndex**: The new track index for a train to be placed on
37
+
***newNode**: The new track node for a train to be placed on
38
+
***direction**: The direction a train should be traveling for this junction
39
+
40
+
## Return value
41
+
Returns true if junction id is valid, false otherwise.
0 commit comments