Players, buildings, moving trains.

Discussion in 'Mapping Questions & Discussion' started by Grubzer, Jul 5, 2016.

  1. Grubzer

    Grubzer L4: Comfortable Member

    Messages:
    178
    Positive Ratings:
    28
    If player will jump on top of the func_tracktrain, or func_movelinear, they will continue moving, but player will not move with them, and after few jumps he will fall of. And if engineer will build building on them, building will stand still, but train will continue moving. How to make player and buildings move with func_ tractrain or movelinear?
     
  2. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    You would have a trigger_multiple parented to the train then have it parent the !activator to the train when they touch it, and unparent them when they leave the trigger. Im not sure if this works for buildings however.

    Edit: format for the outputs in the trigger would be OnStartTouchAll : !activator : SetParent : [name of train]
    OnEndTouchAll : !activator : RemoveParent : [name of train]

    RemoveParent may be called something else but it would be somehting similar.
     
    • Thanks Thanks x 1
  3. Grubzer

    Grubzer L4: Comfortable Member

    Messages:
    178
    Positive Ratings:
    28
    I tried it. Player movement becomes strange and laggy, and for some reason i cant buil anything on func_movelinear. I can give you a link to download my testing map.
    I tried it with OnStartTouch, so more than one player can be parented to train
     
  4. sooshey

    aa sooshey :3c

    Messages:
    522
    Positive Ratings:
    418
    Player movement is going to look weird no matter what, because moving platforms just don't work well in source. If the payload platform on frontier looks like your issue then I think that's all you can do.
     
    • Thanks Thanks x 1
  5. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    Yeah, source is pretty buggy with that kind of thing, i should have mentioned it really (but i forgot). Its probably best to not implement moving with the platform and put a func_nobuild on it so that it cant be built on.

    Also OnStartTouch is only triggered by the first person to enter, wheras OnStartTouchAll is triggered every time someone enters.
     
    • Thanks Thanks x 1
  6. Grubzer

    Grubzer L4: Comfortable Member

    Messages:
    178
    Positive Ratings:
    28
    ok. I just want to create a map with train going around, and it will be weird, if players will fall if they will jump.
     
  7. zahndah

    aa zahndah professional letter

    Messages:
    718
    Positive Ratings:
    627
    im pretty sure you automatically jump with the same momentum as when you were standing, and i also think players automatically move with trains so i dont know whats wrong here, but with the parenting players to it they should keep moving with it when they jump.
     
    • Thanks Thanks x 1
  8. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,842
    Positive Ratings:
    4,774
    (Actually it's the other way around)
     
    • Thanks Thanks x 2
  9. iiboharz

    aa iiboharz Meme Queen

    Messages:
    707
    Positive Ratings:
    1,030
    There's not much you can do about it. Source is just a strange engine. On a larger scale I'd do something like CTF Convoy. Its geometry is static but everything else moves/scrolls around it.
     
  10. Grubzer

    Grubzer L4: Comfortable Member

    Messages:
    178
    Positive Ratings:
    28
    i looked at ctf_convoy in hammer. skybox is static too, only textures moving. and also, is there any possible way to allow stickies grab dynamic things