Alternative path for payload

ics

http://ics-base.net
aa
Jun 17, 2010
841
541
So i've been considering slight change on the payload map i am working on and i couldn't find much reference over internet about this issue. I'll explain what i want would like to do and what seems to happen if i do it.

I have path_track path_69, in which i have next stop target as path_70_alt_1 and branch path path_70. So basically the alt-way is enabled on the go and once the cart would read certain point on the track, i would trigger EnableAlternatePath so the track would change it's way to path_70 but problem is that the map crashes as soon as i join team (because the payload goal system cannot reach to the end and create visual path gui)

If i keep the original path from path_69 to path_70 and branch as path_70_alt_1 and switch for example on point capture with EnableAlternatePath, game crashes again. Anyone got such idea working like how switch from next stop target to branch path?
 

tyler

aa
Sep 11, 2013
5,102
4,621
I think that the branching path logic on path_tracks is broken, and to my knowledge people that make branching payloads use I/Os to enable a path at random (starting with both disabled).

I wouldn't advise you do this. Firstly you are limited by the HUD--both paths need to be the same length or it completely breaks and becomes unusable. Secondly it's very difficult to balance. I believe the only "finished" map to do this is pl_Dyanamite (yes, capitalized) and it's not only really imbalanced but also quite a terribly done map in the first place. The maps that never got finished that used branching paths might be more balanced but again the strain of such an idea is so much that no one really finishes. I think nik was making one, if I remember right, and it never left alpha.
 

ics

http://ics-base.net
aa
Jun 17, 2010
841
541
Yeah i suspected that it could be broken as the hud won't adjust on the fly and trying to do so will cause game crash. But the main idea was that lets say if other team reaches fairly quick to CP1 and is onward on CP2, they have to take the longer route. When teams switch, if the other team nearly manages to CP1 and is onward to CP2, they would have the shorter route in their use. So i would disable the alternative way completely if there is little time left.

This is actually a quite far thought idea, as both teams will have the longer route (if they are both good) but would the player understand that, it is another case. I would hate to rely on random route picking as it completely breaks the idea.

I guess what i am trying to do is not possible atm. :(
 

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
It's not.

YES IT IS! everything is possible.
have you considered using the teleportToPathTrack input on func_tracktrain? that way you can get the cart on any path you want (crash free!) but I'm not sure the hud is going to work. There might be a way to fix the hud depending on your track layout but hey, one thing at a time.
 

ics

http://ics-base.net
aa
Jun 17, 2010
841
541
I considered teleporting but it would make it jump from spot to another, thus, looking very stupid. It's used only on multiple stage payloads.

**EDIT**

Though.. if i make it teleport on same spot as it starts teleport from, just changing the path_track, it could work unless it's disappearing and appearing with delay. Interesting, I'll try that. Thanks.
 
Last edited:

nelli2

L1: Registered
Nov 24, 2008
45
0
alernat paths

just make sure paths are equal lenghts, make sure rollbacks etc. occur in the same are. here is a link to on of my maps that might help. http://forums.tf2maps.net/downloads.php?do=file&id=4870 also pl_clastic_heights has an alternate route example. just decomplie it. it is on the contest entry page for dynamic payload. it is my map. actually anyone can do the same if they want to.
nelli2
 

ics

http://ics-base.net
aa
Jun 17, 2010
841
541
Things will fail on the HUD, which makes my idea impossible to use. The idea was to extend other teams route on the track if they advance too fast (aka they are steamrolling the other team).
 

Draco18s

L9: Fashionable Member
Sep 19, 2009
622
136
Having actually fucked around with this...

It is very much possible to use alternate routes.

Here's the caveat:
The HUD does not update properly after setup is complete.

I'm failing to remember the exact conditions, but I believe the path would only properly update the HUD if the route moved from no roll zones to one with roll zones, and back. Things also get wonky if the route changes in length.

What I did for my Dynamic Payload contest entry is a bit of a hack. Simply, I set the default route to be path_start to path_end, then have the alternate on path_start to be the true next path, then I can do whatever modifications to the route I want to, then on setup end do the following (IIRC):

1) disable the team train watcher entity
2) switch path_start to it's alternate route (the true route)
3) re-enable the team train watcher
4) profit

If you'd like the uncompiled map to dissect, I'd be happy to supply that.
 

nelli2

L1: Registered
Nov 24, 2008
45
0
alt routes

hey just trying to help. I know some things to be true about alternate route maps. because i have done them with success meaning playable maps.
1. all routes have to be the same lenght or it wont show on the hud correctly.
2. rollback and roll forward zones have to be the same distance exactly from the split to show on the hud correctly.
3. you can have random selection at startup or have the team choose the alternate route in game play, by shooting a sign or pushing a button.
4. if the cart rolls back past the point of track selection the other route can be chosen.
5. alternate routes can occur between two capture points or have capture points on each alternate route exactly the same distance from when the tracks split and the capture points are tied together, meaning if one point is captured then all the points in the alternate track zones are captured.
6. you can have two, three or more alternate routes.
7. all alternate routes have to meet up again.
8. you could have two ending points as long as it meets the criteria above, but that would be too confusing i think.
9. refer to rule 1.
hopefully this might help you out one way or another.
 
Last edited:

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
Can you have teams select a route by standing in a particular capture zone? That seems more in keeping with TF2's gameplay style.
 

nelli2

L1: Registered
Nov 24, 2008
45
0
alt routes

any trigger method would work. including standing in a spot. don't make it a capture point. use a trigger multiple and put a delay of any time you would want until it triggers. the benefit of pushing a button or shooting a sign is to keep the game more fluid.
 
Last edited:

Draco18s

L9: Fashionable Member
Sep 19, 2009
622
136
hey just trying to help. I know some things to be true about alternate route maps. because i have done them with success meaning playable maps.
1. all routes have to be the same lenght or it wont show on the hud correctly.
2. rollback and roll forward zones have to be the same distance exactly from the split to show on the hud correctly.

All of this is bollocks.
Go download this map and you'll see that it is entirely possible to make routes different lengths (that was a stated design goal of my entry: do you want long and hard to defend or short and easy to defend?).

I don't even have the same number of roll zones in each split, much less their length, positioning, and direction.

It is, however, impossible to allow that kind of alternate route after startup has completed, as once the track length has been determined, altering that length does Bad Things. It's functional, but very messy (the cart will jump around and the CPs won't update, and roll zones will only update if you move from "any" to "none" or "none" to "some").

any trigger method would work. including standing in a spot. don't make it a capture point. use a trigger multiple and put a delay of any time you would want until it triggers. the benefit of pushing a button or shooting a sign is to keep the game more fluid.

I made a semi-prop that's one of those old fashioned rail switch levers with a func-breakable on it (doing onTakeDamage proved too buggy, if I wanted to prevent the object from actually breaking eventually--or I was just doing it wrong, either way). I even animated it (woo, func_door_rotating).

The only downside is often forgetting to actually SHOOT them.
 
Last edited:

nelli2

L1: Registered
Nov 24, 2008
45
0
bollocks, really!, does anyone actually say that. it is kind of humorous. i think that will be my new screen name. don't steal it. i've played your map and the hud is still wonky. my suggestion is for a hud that is functioning the way it was supposed to. plus you let red decide the path for blue to travel. maybe not a good idea. i could be wrong. the best suggestion is for blue to change routes depending on red defence. in game decisions keeping it fluid and dynamic. maybe you should let blue select the route and let it be a crap shoot on what kind of defences they run into. maybe have a control board that shows the selected route. if you can get the hud to work you might be on to something. good job.
 
Last edited:

Draco18s

L9: Fashionable Member
Sep 19, 2009
622
136
bollocks, really!, does anyone actually say that. it is kind of humorous. i think that will be my new screen name. don't steal it.

Hehe.
I use it when it feels appropriate. :)

i've played your map and the hud is still wonky. my suggestion is for a hud that is functioning the way it was supposed to.

It's the best I could do. In theory I could make it update properly during setup, but it requires disabling and re-enabling several entities (I'd have to change the route from the current route, to the "blank" route, then change it again to the new route, and all very fast).

plus you let red decide the path for blue to travel. maybe not a good idea. i could be wrong. the best suggestion is for blue to change routes depending on red defence. in game decisions keeping it fluid and dynamic. maybe you should let blue select the route and let it be a crap shoot on what kind of defences they run into. maybe have a control board that shows the selected route. if you can get the hud to work you might be on to something. good job.

I intentionally wanted Red to decide the route, as if Blue decides, Red doesn't know where to set up, making a defense almost impossible. And switching routes mid-round would just cause HUD issues.

I had thought about some kind of indicator in the Blue spawn showing the rout (the control board idea) but I never got around to implementing it.
 
Oct 6, 2008
1,947
445
Having never done this before - is it poosible to just turn on and off differnt trainwatchers without having the game crash?

If cart stays path 1 - trainwatcher 1

If cart goes path 2 - enable trainwatcher 2, disable trainwatcher 1

Wouldn't that fix the issue easier?
 
Last edited:

Draco18s

L9: Fashionable Member
Sep 19, 2009
622
136
Having never done this before - is it poosible to just turn on and off differnt trainwatchers without having the game crash?

If cart stays path 1 - trainwatcher 1

If cart goes path 2 - enable trainwatcher 2, disable trainwatcher 1

Wouldn't that fix the issue easier?

You can turn them off all you want. It doesn't really...do much.

The problem is that you have to:

1) turn it off
2) switch the route to a piece of track with no roll zones
3) turn it on
4) turn it off
5) switch the route to the new route
6) turn it on

Without 2-4, the HUD doesn't update properly. Having a second watcher isn't going to change that.
 

ics

http://ics-base.net
aa
Jun 17, 2010
841
541
Getting back on this topic while i start building the map, soon. Thanks for the valuable information. I'll try to do something and experiment with it when i build it and see if i can put some of the advices here in use. Just that the HUD updating is the issue now that might prevent some of the things i was planning on from working.

You can turn them off all you want. It doesn't really...do much.

The problem is that you have to:

1) turn it off
2) switch the route to a piece of track with no roll zones
3) turn it on
4) turn it off
5) switch the route to the new route
6) turn it on

Without 2-4, the HUD doesn't update properly. Having a second watcher isn't going to change that.

Does the route in part 5 needs to have roll zone?

One other thing i noticed is that if the cart has blinking light (goldrush, badwater does) and if the map has roll forward or backward zones, those stop working. Barnblitz, upward and thundermountain do not have light blinking due to them having those zones.
 
Last edited:

Draco18s

L9: Fashionable Member
Sep 19, 2009
622
136
Does the route in part 5 needs to have roll zone?

No. Which makes things simpler (if and only if, the initial route does) as you can simply switch routes (no need for a "blank" third).

I'll have to double check, but off-hand that still won't update the CP locations correctly. I remember having the issue, I don't remember what fixed it (I may have killed and respawned the team_train_watcher instead of simply disabling it).