Button trouble

bamibal

L1: Registered
Aug 14, 2015
47
5
Hello, I´m making my first map and slowly getting the hang of it. Now there´s one thing that I can´t seem to figure out. Ater googling, experimenting and compiling for hours without result I figured it would be a wise step to register here and ask :p

I got a ´train´(actually a moving prop) up and running, it runs a continuous pattern. I made a button on the wall which you can smack and does 'SetSpeed 800', making the prop go beserk. So far so good. At first I tried to make it so that you press the button, prop goes beserk, press it again to turn it back to normal:

imjzmMQ.jpg


Result: prop goes beserk, but after whacking the button again to depress it, it doesn't go back to 100 speed. Tried it with the 'toggle' flag enabled and disabled but both didn't work.

Tried some other things but all didn't work. Then I thought, if this has to be so hard, I'm gonna try something different and make it a timed sequence with the prop going beserk for 8 secs:

K65clKa.jpg


Unfortunately, same result. Once the speed is set to 800 it just won't go back to 100. I hope someone can help me out here:thumbup:
 

spudboy

L1: Registered
Feb 8, 2015
37
6
I'm going to assume that you're using a func_tracktrain because you haven't said what you're using and it's the only thing I'm familiar with that can do what you're saying.
I looked on the Valve Developer wiki and under the inputs, it says this about setspeed:

SetSpeed <float>
Set the speed of the train, as a ratio of max speed [0, 1]

So I'm pretty sure what you want to be doing is setting the train's max speed to 800 and using setspeed 1 to make it go at 800 and setspeed 0.125 to make it go at 100.

Hope this helps.
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
if I remember correctly, trains (other than the cart) don't work in TF2. be careful, and can we see the properties instead of the inputs/outputs
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74

that's what I was concerned about... because no map (I have ever seen) has used any hint of a separate track train for separation of ledges. and tyler, once I get my issue dealing with the prop library, im curious how exactly I set up a split Payload track path.
 

killohurtz

Distinction in Applied Carving
aa
Feb 22, 2014
1,016
1,277
that's what I was concerned about... because no map (I have ever seen) has used any hint of a separate track train for separation of ledges. and tyler, once I get my issue dealing with the prop library, im curious how exactly I set up a split Payload track path.

You may want to take a long hard look at Well and Freight if you don't think trains work in TF2.

Also, make your own separate thread if you have an unrelated question. Don't hijack someone else's.
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
You may want to take a long hard look at Well and Freight if you don't think trains work in TF2.

Also, make your own separate thread if you have an unrelated question. Don't hijack someone else's.

yea... sorry about that. but yea some days your forget maps exist. though on a serious note, I think the thing we need is the related properties of the entities/brushes involved
 

bamibal

L1: Registered
Aug 14, 2015
47
5
@spudboy and coltnweston, it's indeed a func_traintrack tied to a ghost prop. It runs perfectly along it's path_track and it does go to speed 800 when I smack the button, it just doesn't go back to 100. I didn't notice the ratio part you mentioned and that might be the key, gonna try it now! If it doesn't work I'll post the settings.
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
@spudboy and coltnweston, it's indeed a func_traintrack tied to a ghost prop. It runs perfectly along it's path_track and it does go to speed 800 when I smack the button, it just doesn't go back to 100. I didn't notice the ratio part you mentioned and that might be the key, gonna try it now! If it doesn't work I'll post the settings.

alright I wish you luck, a lot of hammer is learning from others, the dev page, and trial and error. so good luck
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
No luck involved. Using 0-1 as a ratio of the func_tracktrain's max speed is what is required as an input when using SetSpeed. For example, SetSpeed 0.1 would be 10% of the train's max speed.

If you want to set the train's speed in units-per-second rather than a ratio, then you use the SetSpeedReal input. The train will accept any value up to its maximum speed.

Trains are quirky, but they definitely work. I can assure you of that because of my experiences working on Deathrun maps, where trains are used commonly.
 

bamibal

L1: Registered
Aug 14, 2015
47
5
Damn, I set the ratio and compiled, only to see all my lighting was broken and every brush was black! I started making a lot of things func_detail and now the lighting is back (could be coincidental too, I don't know). But the good news is, my button is now working! Thanks guys!
 

MoonFox

L10: Glamorous Member
Mar 17, 2015
739
74
Damn, I set the ratio and compiled, only to see all my lighting was broken and every brush was black! I started making a lot of things func_detail and now the lighting is back (could be coincidental too, I don't know). But the good news is, my button is now working! Thanks guys!

enjoy