Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/archive/global.php(40) : eval()'d code on line 2
Is this random track_train path possible? [Archive] - TF2Maps.net Forums

PDA

View Full Version : Is this random track_train path possible?


bob+M|M+
04-29-2008, 04:28 PM
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:

http://img360.imageshack.us/img360/8036/trainpathjc3.jpg (http://img360.imageshack.us/my.php?image=trainpathjc3.jpg)
(Does track_train HAVE to be in a closed path? Can I toggle paths somehow?)

http://img291.imageshack.us/img291/9171/jumpplatlu8.jpg (http://imageshack.us)
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

Foreverkul
04-29-2008, 05:37 PM
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.)

Pseudo
04-29-2008, 06:38 PM
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.

bob+M|M+
04-29-2008, 09:04 PM
I love tf2maps.net. quality posts everywhere :]

bob+M|M+
04-29-2008, 09:06 PM
I'll try it out this weekend when I have time. I'll update then.

bob+M|M+
05-01-2008, 03:48 PM
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.