Train Error.

pennsyrail

L2: Junior Member
May 12, 2016
62
6
Hello everyone, and thanks in advance for your help! I have been working on a warehouse map that has a train (as all good maps do) running through it. I followed the train making tutorial by spammish, with a logic_timer and it starts and runs fine. The problem is that it won't reset and start again after the timer retriggers. I tool a look at well as well (bad pun) to see if they did anything different... Nope. I'll send a few pics an my vmf file. Thanks,

Pennsyrail (in game Compost Toilet]
 

Attachments

  • Train 3.png
    Train 3.png
    1.2 MB · Views: 178
  • Train 3.png
    Train 3.png
    1.2 MB · Views: 190
  • Train 4.png
    Train 4.png
    1.2 MB · Views: 162
  • Train 1.png
    Train 1.png
    789.7 KB · Views: 164
  • tmp_4887-TrainIssue-120154349.vmf
    730.7 KB · Views: 142

MOCOLONI

L6: Sharp Member
Dec 16, 2014
373
89
First of all, it seems that your'e using func_tanktrain as the moving brush, which should rather be a func_tracktrain for your case. It also seems that the train isn't set up to get teleported back to its initial position. Add this output to the logic_timer entity once it's a TrackTrain:

OnTimer
train
TeleportToPathTrack
path_01


Lastly, set the "StartForward" Input's delay to "0.01" so it won't get stuck after getting teleported.
 

pennsyrail

L2: Junior Member
May 12, 2016
62
6
I got the tracktrain error fixed, but the timer doesn't have an option to set a specific path_track to teleport to. It doesn't move at all now, which makes sense...
 

Attachments

  • tmp_28450-2017-06-22 09.10.31-478368723.jpg
    tmp_28450-2017-06-22 09.10.31-478368723.jpg
    1.4 MB · Views: 137

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
It doesn't matter whether you use func_tanktrain or func_tracktrain. They work the same.

Your logic is mostly correct, but you need to specify the name of the path_track you want to teleport the train to as the parameter of TeleportToPathTrack. Most I/O doesn't use the parameter field so it's easy to miss.

For screenshots I recommend ShareX. You can easily capture the whole screen, a specific portion or just your currently active window using keyboard shortcuts, and have it immediately uploaded to Imgur and the URL put in your clipboard.
 

MOCOLONI

L6: Sharp Member
Dec 16, 2014
373
89
I got the tracktrain error fixed, but the timer doesn't have an option to set a specific path_track to teleport to. It doesn't move at all now, which makes sense...
You have to add "path_01" yourself, replacing the "<none>" value.
It doesn't matter whether you use func_tanktrain or func_tracktrain. They work the same.

Your logic is mostly correct, but you need to specify the name of the path_track you want to teleport the train to as the parameter of TeleportToPathTrack. Most I/O doesn't use the parameter field so it's easy to miss.

For screenshots I recommend ShareX. You can easily capture the whole screen, a specific portion or just your currently active window using keyboard shortcuts, and have it immediately uploaded to Imgur and the URL put in your clipboard.
func_tanktrain doesn't currently support the "TeleportToPathTrack" input.
 

pennsyrail

L2: Junior Member
May 12, 2016
62
6
Lordy Be! It worked! I had some leaks (actually too many high detail brushes) which i fixed and no it works! I can get my big long custom sound using train going now. I'll have to upload the map for you guys when it's done!
Cheers and happy mapping,
Compost Toilet.
GGonna go make me a samich!
 

pennsyrail

L2: Junior Member
May 12, 2016
62
6
I was also wandering if shadows work in skyboxes? Mine seems not to cast any from the props. Maybe cause the hollow box is coated in toolssky?
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
func_tanktrain doesn't currently support the "TeleportToPathTrack" input.
It's not in the FGD but it does support the input.

I was also wandering if shadows work in skyboxes? Mine seems not to cast any from the props. Maybe cause the hollow box is coated in toolssky?
Shadows work in the skybox like they do in the world. Are you having trouble with a prop in the skybox not casting a shadow on to something else in the skybox? Or are you having trouble with a prop in the skybox not casting a shadow on to something in the world?
 

pennsyrail

L2: Junior Member
May 12, 2016
62
6
No. The sun shines into the skybox and should be casting shadows on props as well as displacements. As soon as I shrunk it down it stopped casting. I can send pics later or you could check the vmf I posted
 

pennsyrail

L2: Junior Member
May 12, 2016
62
6
I was thinking it might be a light_env+sun problem possibly. They don't seem to cast anything into the skybox unless I noclip into it and place a dispenser. Then it will cast, but otherwise all my farm things wondering do crap.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
The lightmap scale of your skybox terrain is set to 50. That's too high if you want any shadows to show up on such a small brush. Since you're working on stuff that's sixteen times smaller you'll have to reduce the lightmap scale as low as it will go to get the best possible shadow definition.

bdCxLna.png


You can show the Lightmap view by clicking the 'camera' button in the top left of your 3D viewport and selectiing 3D Lightmap Grid. You don't need to use this view mode to edit lightmaps, you only need to select the faces you want to edit using the Face Edit Sheet (Shift+A) and changing the number in the Lightmap scale field. I used 2 and got the following result with a fast compile:

qRyTvXP.jpg


When you do a full compile the shadow quality should be a bit better but you shouldn't expect much on such a small scale. You can further improve the shadows cast by props by using the StaticPropPolys compile parameter, which is selected by default when you use CompilePalX's Publish preset. More information about that here (WHY EM MADE THAT GUIDE!).

More information about lightmap resolution here. Just keep your lightmap scales at the default of 16 and don't muck about with them until you start to detail properly much, much later on.