


Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
//Remember to make the train model in radiant a script_model, and clip it with script_brushmodels
//Then give the train a targetname - train_test. Now make the train target each clip. Select train, then clip, hit W (repeat for all clips)
function train_init()
{
train = GetEnt("train_test", "targetname");
train_clips = GetEntArray(train.target, "targetname");
foreach(clip in train_clips)
{
clip SetMovingPlatformEnabled(true);
clip EnableLinkTo();
clip LinkTo(train);
}
//You would need to set up script_origins in radiant along the path the train will travel
//We'll call these 'nodes' for now
//From the starting node, link the first node to the 2nd, 2nd to the 3rd, until you reach the last node.
//Give the first node a script_noteworthy - start_node
//And the last node a script_noteworthy - end_node
//The train should already be at the start_node
train.start = GetEnt("start_node", "script_noteworthy");
train.trig = GetEnt("your_trig", "targetname");
train thread train_move();
}
function train_move()
{
self.trig waittill("trigger");
next_node = self.start;
while(1)
{
next_node = GetEnt(next_node.target, "targetname");
self MoveTo(next_node.origin, 1);
self RotateTo(next_node.angles);
self waittill("movedone");
if(next_node.script_noteworthy == "end_node")
{
break;
}
}
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
Awesome man, I hope you got this working, would love to see it in action!
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |