TF2: More than eight control points?

Discussion in 'Mapping Questions & Discussion' started by Cybris, Oct 21, 2008.

  1. Cybris

    Cybris L1: Registered

    Messages:
    18
    Positive Ratings:
    1
    Dear fellow mappers,

    is there a work-around for the hard-coded limit of 8 control points per map in TF2? I'm adding a third stage to pl_cranetop, but the game crashes when I try to load a map compiled with 9 or more CPs.

    I tried getting a train watcher to use a CP from another stage (of course I used SetTeam etc. to reset it), but the faux-9th CP just isn't there. The train watcher shows the whole path with no CP at the end, and completes the stage when the second-to-last CP is captured. Maybe I did something wrong - location of CPs should be irrelevant, but the double-used CP is ignored nonetheless.

    Also, I tried to use a prop_dynamic with the CP model, but it doesn't animate and only has one skin, which I couldn't change, even with inputs.

    Have any of you succeded in creating a work-around for the limit with a fake or double-used CP or any other means? I really need a 9th CP.
     
  2. Kill_the_Bug

    Kill_the_Bug L14: Epic Member

    Messages:
    1,461
    Positive Ratings:
    236
    Download my bugscaonyon map and decompile - you'll see how I did it - or maybe its only 8 - me at work right now - the screenshot should tell you too - no team train watcher though

    I have a test map I can post - where should I post it?
     
    Last edited: Oct 21, 2008
  3. laghlagh

    laghlagh L6: Sharp Member

    Messages:
    391
    Positive Ratings:
    52
    It's only 8, sorry.
     
  4. Kill_the_Bug

    Kill_the_Bug L14: Epic Member

    Messages:
    1,461
    Positive Ratings:
    236
    ok - will checj the test map when I get home - it might be 9 but the watcher only goes to 4
     
  5. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    462
    My idea is, you "recycle" control points.

    The ninth point is actually the first, you just reset it's owner upon the start of the round, and replace it in-game with the hologram model found in the models directory, which performs all the appropriate visual tasks.

    So, the 1st point, say CP_1, is also in the 3rd round. Upon starting the third round, the point's original owner is set back, and then it acts like a normal control point, although the thing that represents it in-game is actually just a model. The CP will have to send appropriate responses to the hologram as well.
     
  6. Scouttastic

    Scouttastic L1: Registered

    Messages:
    13
    Positive Ratings:
    0
    You're making a TL map and a TL map doesn't need skins dude.
     
  7. Cybris

    Cybris L1: Registered

    Messages:
    18
    Positive Ratings:
    1
    I have found a work-around, albeit with a small cosmetic problem if you have setup timers:

    You have to use a CP from another round twice. You just enter it into the team_control_point_round and team_train_watcher entities as usual, and this doesn't cause any problems, even though it is there twice, in different rounds. But: you have to reset the owner of the CP for the new round. Unfortunately, you cannot set the owning team (using the setowner input) before the round where it's reused has started.

    Example: Suppose you use cap_a_1 and reuse it in round C. You cannot change the owner back to RED in rounds A (obviously, it's still needed) or B (non-obviously). If you change the CP owner, even in round B where it is not used, the next round will be broken - players will spawn in the round A spawn rooms, and other bad effects will happen.

    The solution is to reset the owner of the CP in round C. Unfortunately, you cannot set the owner while the setup clock is ticking - the input is ignored. Only after setup time for round C is over, the CP owner can be set.

    This means that during round C setup time, the CP will show the wrong color. It's just a visual problem, but there doesn't seem to be a work-around. I've tried disabling the team_control_point_round for A, but it didn't work. Round A would be restarted, but be broken. So, I'll have to live with this cosmetic problem.

    Obviously, if you don't have a setup timer (or make the setup timer yourself with a timer entity), this won't be a problem.

    Now, for the visual representation of the CP in the map: It's not possible to use a prop_dynamic as a fake CP, because the model (cappoint_hologram.mdl) doesn't have skins. It always shows up as neutral and cannot be changed. Also, you have to start the rotation animation by hand (using setanimation idle).

    But, there is a simpler solution: you place a point_teleport to where you want the CP to appear (in the later round) and set the "entity to teleport" attribute to the name of the CP. When the round starts, you trigger the teleporter and the CP appears at the correct destination. You don't have to use the prop_dynamic at all!

    This whole method of faking a CP works pretty flawlessly, aside from the setup coloring thing. Of course, it would be much easier if Valve just allowed more than 8 CPs per map.