Is this random track_train path possible?

bob+M|M+

L6: Sharp Member
Mar 31, 2008
346
394
I want a random aspect implemented into my map. I know just the bare basics of track_train so I'm not sure if this is possible. Here's what I want to accomplish:


(Does track_train HAVE to be in a closed path? Can I toggle paths somehow?)


Can I do this using env_entity_maker? and somehow destroy the track_train when it reaches the end of its path?)

Any thoughts, comments, or insight would be appreciated =)

Thanks
bob
 
Last edited:

Foreverkul

L4: Comfortable Member
Apr 12, 2008
157
14
Yea I think could do that...lemme look into it.

To make a random path change, make a logic_timer and just set a random interval then make an output that changes the track path: onTimer>[path name]>ToggleAlternatePath

To kill the train at the end, you could parent a trigger multiple to destroy it when the play leaves or you can just Kill it using a delay on another trigger.

To spawn a new one, you make a point template and assign it the track train (plus the trigger multiple if you have one). Then you would make an entity maker at the start (though I don't think it matters where because the train should teleport to the first track spot). Right before you get on the train you would have a trigger multiple that would force the train to spawn. (Make sure on the entity maker you check the "only if room" box in flags and on the template check the "fix names" box flag.)
 
Last edited:

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
You could also have a logic_case pick a random path. Like if you have a path_track called track1 followed by one named track2, you could give track1 an OnPass that sends a logic_case the input PickRandom. The logic_case's outputs would be: OnCase01 track2 EnableAlternatePath; OnCase2 track2 DisableAlternatePath.

I don't think you would need to Kill the train and then spawn a new one. path_track has a flag, "Teleport to this path track". If you check that flag on the first path_track and tell the last path_track to go to the first path next, the train will instantly teleport from the end of the track to the beginning.
 
Last edited: