Players get stuck in moving brushes

Discussion in 'Mapping Questions & Discussion' started by [Rx.] Christian Troy, Jul 2, 2017.

  1. [Rx.] Christian Troy

    [Rx.] Christian Troy L4: Comfortable Member

    Messages:
    162
    Positive Ratings:
    43
    I created func_tracktrain with a path track in a loop going around the map with a parented prop helicopter carrying a platform of moving brushes for players to snipe from. Everything works smooth so far and everything moves on the path track fine.

    The problem is on the platform of moving brushes. The platform has walls around it made of moving brushes that players are getting stuck in on some of the turns. Added in some solid props near the walls and players got stuck in the props as well on turns even with player clip added to the walls.

    What can I try from here?
     
  2. Egan

    aa Egan

    Messages:
    1,307
    Positive Ratings:
    1,488
    Yea so the payload cart would also have this issue but the engine allows really simple geometric shapes to repel players so they don't get stuck. (during a 'End of the Line' playtest the devs even mentioned that the simple boxes the engine allows was pushing it !).

    Maybe you could find some physics prop or func_tracktrain setting that could help prioritise the collisions, but my simple suggestion would be to maybe just place trigger_teleporter (with Clients flag turned on!) to teleport players back to the center of the moving platform (can parent destinations).

    You can see the collision meshes of props by clicking hammer's CM button, and then just place the trigger ever-so-slightly inside of the mesh like:
    [​IMG]

    Others who have made custom payload carts might be able to chime in with other solutions, last I tried I couldn't really fix it.
     
    • Thanks Thanks x 1
  3. [Rx.] Christian Troy

    [Rx.] Christian Troy L4: Comfortable Member

    Messages:
    162
    Positive Ratings:
    43
    That could work but I'm wondering if that could get annoying too with 8 turns in the loop. (It circles the edge of the maps main play area with a helicopter for each team parallel to each other)

    One solution that seems to work is making the func_tracktrain's setting "Change Angles" "Never" for the platform of brushes then making another func_tracktrain with that same setting changed to "Near path tracks" for the helicopter prop so it still turns but the platform doesn't. Players don't get stuck in the walls that way but, it's not nearly as appealing.

    [​IMG]

    So far here is the current settings where players do get stuck with the platform turning.
     

    Attached Files:

  4. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    834
    Does your tracktrain have the 'Unblockable by players' spawnflag enabled?
     
    • Thanks Thanks x 1
  5. [Rx.] Christian Troy

    [Rx.] Christian Troy L4: Comfortable Member

    Messages:
    162
    Positive Ratings:
    43
    Yes, without it the whole thing would stop at a turn if a player was near one of the corners of the wall inside the platform.
     
  6. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    834
    That's what causes players to get stuck in walls and stuff. When turned on, if a player stands between the train and a wall, the train will push him into the wall. When it's turned off, the train will stop.

    Try turning off that spawnflag and turning on the 'HL1 train' spawnflag.
     
    • Thanks Thanks x 1
  7. [Rx.] Christian Troy

    [Rx.] Christian Troy L4: Comfortable Member

    Messages:
    162
    Positive Ratings:
    43
    Gave it a go and it stopped everything from moving on any turn when a player was near a wall on the platform. :( But yea that is what is happening it seems at the moment. Going back to the original set up, one wall is pushing the players into one of the other walls on the turns.

    After messing with this for about 4 hours I went with the alternative solution. The platform's func_tracktrain "Change Angles" is set for "Never". Then created another func_tracktrain for the helicopter with the "Change Angles" setting set for "Near path tracks". This allows the helicopter prop to turn on all the turns but keeps the platform from turning and still moves smoothly with everything else. It's not as cool looking or pretty as the original set up but, it does keep players from getting stuck.

    Thank you to you two who took a shot at this! ;)
     
    • Like Like x 2
  8. worMatty

    aa worMatty Repacking Evangelist

    Messages:
    1,072
    Positive Ratings:
    834
    That's a clever trick!