Grubzer

L5: Dapper Member
Jan 3, 2016
203
39
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?
 

zahndah

professional letter
aa
Jul 4, 2015
721
642
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.
 

Grubzer

L5: Dapper Member
Jan 3, 2016
203
39
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.
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
 

sooshey

:3c
aa
Jan 7, 2015
514
410
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.
 

zahndah

professional letter
aa
Jul 4, 2015
721
642
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.
 

Grubzer

L5: Dapper Member
Jan 3, 2016
203
39
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.
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.
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.
 

zahndah

professional letter
aa
Jul 4, 2015
721
642
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.
 

iiboharz

eternally tired
aa
Nov 5, 2014
857
1,291
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.
 

Grubzer

L5: Dapper Member
Jan 3, 2016
203
39
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.
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