Making objects move on complex randomized routes
(I can upload the map vmf if it helps, minus the trashy spiderweb of path_tracks I tried.)
Here are some pics. the rooms are colorcoded, the walls are orange and the possible paths are cyan/blue.
map.pngI just want an object to be able to arbitrarily go along these paths as it pleases, without a specific order, pausing at each major room/endpoint.
You could try a logic_case with the random selected input/output and a set of teleport landmarks. I haven't used much Portal2/Hammer in quite a while so I know those might not be accurate names of the entities. I'm sure you can figure out what I mean. Or try path_tracks with a logic_case with outputs that have both movetopathpoint and teleporttopathpoint. That should make it look random.
I'm not saying this idea will work, but it is an idea for you to look into maybe?
I did try the movetopathnode output but it didnt really work because the origin path_track must be directly connected to the target path_track in a forwards connection, which isn't possible since path_tracks can only connect to one other path_track, plus one alternate branch path.
Actually I have an idea (this next part is my thoughts in real time so there may be confusion)
Maybe using a system of teleports and movetopathnode would work, but a little bit different way.
I could have the object just have an origin point that isn't too suspicious looking, maybe the black room (hallway type area) and have most of the paths lead back to it, then have the moving object teleport-switch paths to an identical point on that origin that leads to a new room of the map, and once the moving object has made a stop at those places, they would be idle there for however long I wanted.
Then, afterwards, I would build branching paths, which have origin points identical to those stop points in the rooms that the moving object will teleport to after the idle time is up, and have each path point is teleports to be randomized.
The paths could be from one room to the neighboring, without including ones that aren't nearby. For example, room light blue could lead to room light red and room puke brown. Maybe room black. But it could not lead to room purple, room white, room grey, etc.
/ideas
Ok that was a long post XD I'm going to try some more stuff out and report back.
You could try to link path_tracks to any other path_track you want by changing the target.
Just fire
OnFireUser1
myPathTrackToChange
Addoutput
target NewTargetName
That dead end is also the same location of multiple other origin path_tracks, which branch into paths to different rooms. When the train passes the dead end, it waits 3 seconds, and then tells a logic_case to pickrandomshuffle.
The logic_case then tells the train to teleporttopathnode to one of the new tracks in the same location of the dead end, and the train resumes along a random new path.
It may seem pretty complex but using visgroups for all the different tracks, it works pretty well and it isn't too confusing.
This also allows me to turn off the logic_case and instead force the train to visit a specific area, if needed.