Is this random track_train path possible?

Discussion in 'Mapping Questions & Discussion' started by bob+M|M+, Apr 29, 2008.

  1. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    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:

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

    [​IMG]
    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: Apr 29, 2008
  2. Foreverkul

    Foreverkul L4: Comfortable Member

    Messages:
    157
    Positive Ratings:
    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.)
     
    • Thanks Thanks x 1
    Last edited: Apr 29, 2008
  3. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    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.
     
    • Thanks Thanks x 1
    Last edited: Apr 29, 2008
  4. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
  5. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
  6. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    tried it out and it's perfect. those logic_ commands are pretty useful. I ended up killing the trains at the end instead of teleporting them because I wanted the potential for multiple tracktrains to be running at the same time.