buttons to make the train leave.

buttons to make the train leave.

Re: buttons to make the train leave. Posted by Junkyard God on Thu Mar 22nd 2007 at 3:22pm
Junkyard God
654 posts
Posted 2007-03-22 3:22pm
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
Hello,
I've set up my little train, made 3 path_tracks for it and connected them properly, set the next stop target at the first path, so it starts in the right place.

Now, here's my problem, I want to make it move using a button.
But it won't move :sad:
I set the button to target the tracktrain. but nothing happens.

The train is floating in mid air so it's defenatly not stuck or anything, I made the output 'toggle', I also tried "startForward" but both do nothing for me.

Anyone have any clue to what it might be?

Sorry for the sketchy description / typing, entitie problems get me so ANGRY lol.
Hell, is an half-filled auditorium
Re: buttons to make the train leave. Posted by Riven on Thu Mar 22nd 2007 at 8:40pm
Riven
1640 posts
Posted 2007-03-22 8:40pm
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
I've worked a lot with func_tracktrains, enough to have dealt with just about every problem they present. I've had plenty of restless nights because of them. Anyhow, here's what I think you may not be doing right:

First make sure that you go under "flags" in the func_tracktrain's properties and check "fixed orientation" and "No User Control." Now under its "keyvalues" the main thing here is to make sure that its "Initial Speed" keyvalue is set to zero, that is if this train needs to start motionless, it will refer back to this "default" speed you gave it. With that in mind, also set the "Max Speed" to something that you obviously think the train will not go past in velocity.

Now with that clarified (you may have already had those set), I can tell you what I think the problem is. On your button, there needs to be two different outputs there that tell the func_tracktrain to go; they are: the "startForward" target input value, and the "SetSpeed" value. Just by telling the func_tracktrain to go forward only specifies its direction, not its speed, that's why the "SetSpeed" value is necessary, and why your train isn't moving. (of course you would need to enter some integers in the "parameters" box for it to have any effect)

Something else you should know: If you have a value set on each of the path_tracks under "New Train Speed" that will have the same effect. But it is important that you set the speed FIRST from that button you're using. Putting 0 in the "New Train Speed" keyvalue will deliberately not change the func_tracktrain's speed (it'll keep it the same). You will need another input onto the func_tracktrain that tells it to stop, (another "SetSpeed" that says 0).

Anyhow, there could be some other issues, but by the sound of it, I'm pretty sure that may be it. Let me know otherwise, I have a few more tricks up my sleeve :cool:
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: buttons to make the train leave. Posted by Stadric on Thu Mar 22nd 2007 at 8:42pm
Stadric
848 posts
Posted 2007-03-22 8:42pm
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
Did you remember to set the func_tracktrain's first stop property to one of your path_tracks? That's been my most common mistake making trains.

If that's not it, you may have to give the train a max speed, otherwise startforward won't work.
I think toggle just enables or disables the train visibly, or does it actually start or stop it?
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: buttons to make the train leave. Posted by Junkyard God on Fri Mar 23rd 2007 at 6:34am
Junkyard God
654 posts
Posted 2007-03-23 6:34am
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
I'll try Riven's answer when I get home later today. I'm pretty sure I only have the StartForward, and not the SetSpeed and I'm convinced that's where I whent wrong.

Riven, you might want to concider writing a tutorial about tracktrains :smile: Seems like you know pretty much about them hehe, I'll flag you as correct once I've really tested it but I'm sure your solution will work. :smile:

Toggle hasn't done anything really, not that I noticed anyway.

Edit

Well well, 2 correct answers, they both helped me, thanks a million lads, my bridge made out of trains is finished. :smile:
Hell, is an half-filled auditorium
Re: buttons to make the train leave. Posted by Riven on Sat Mar 24th 2007 at 4:53am
Riven
1640 posts
Posted 2007-03-24 4:53am
Riven
Wuch ya look'n at?
super admin
1640 posts 1266 snarkmarks Registered: May 2nd 2005 Occupation: Architect Location: Austin, Texas, USA
Hmm, that's not a bad idea actually, I feel pretty confident in the subject, and have been looking for a good idea to write a tutorial about.

I'll be sure to cover different material than what Booker did for his "Elevators" tutorial.

It's easy for me to get carried away in the details, so I'll be sure to outline this on paper first. I suppose you can all be expecting a func_tracktrain tutorial soon! Thanks for the inspiration Junkyard God.
Blog: www.playingarchitecture.net
LinkedIn: Eric Lancon
Twitter:@Riven202
Re: buttons to make the train leave. Posted by Junkyard God on Sat Mar 24th 2007 at 9:20am
Junkyard God
654 posts
Posted 2007-03-24 9:20am
654 posts 81 snarkmarks Registered: Oct 27th 2004 Occupation: Stoner/mucisian/level design Location: The Nether Regions
Cool, that'd be very helpfull Riven :smile:
Hell, is an half-filled auditorium