#About using texts and timers in a hammer
1 messages · Page 1 of 1 (latest)
In the output system, there's a option in the corner to delay a given ouput by an amount of seconds. You can also do more complicated timers using logic_timer.
Yea, bro, I know about that trigger. But how can I edit text and what should I use to display a timer? Will game_text entity help me?
Oh!
I actually had that thought a while ago, and came up with an answer in the form of lua_run
When it comes to do annoying complicated stuff like this, I just slap a lua_run down and write a small piece of code to do it.
game_text seems to not be changable
Though I think I know a way to display it using chat
Oh, that's bad
I think I need the way to display it in current place of map
Technically if you were a mad scientist you could probably string together logic and a bunch of individual numbers on game_text to create a display, but that's silly.
You mean like, area triggered?
Or area specific?
Nah, just like electronic clock
So, not the chat box?
Not really
Maybe I can find a lua thing that essentially does what game_text does.
Would be fine
Displays a message either in their chat, console, or center of the screen. See also PrintMessage.
When called serverside, this uses the archaic user message system (the umsg) and hence is limited to ≈250 characters.
HUD_PRINTCENTER will not work when this is called clientside.
This has multiple settings.
PrintMessage(HUD_PRINTCENTER, 'hello world')
Add output exists to create new connections between entities on the fly
But it cant change internal variables (like the text contents) unless theres a method to output to
In the screenshot you can see me using lua_run to print a message to the screen
This is a text on a screen, I still need it in a current place
Alright, where?
In some place on map
You mean, floating in 3d space?
On alarm clock prop for example
Or like that
oh I actually have no idea how to do that.
Sounds like lua coding is required.
I don't know any easy shortcuts
That's the problem, I don't know lua at all
Alr at least you tried 👍
Or does it need to be logical?
Yea, maybe
It is technically possible if you make a mechanical clock.
Like it has current time changing
So like, you take a wheel, put numbers on it, and rig it to rotate.
Something like that.
Thanks for idea
If you want I can construct it and send you a prefab, since it seems really simple
But I wud try to get it to electronic level
Nah thx, I know how to rotate props 
But here's the thing.
You make it logical by having it be syncronized to a counter/timer that holds the value representing the clock's time.
And then using the counter/timer for logic.
Yea
If you want it to stop, you stop both.
Maybe? But idk what the entity is it
You could even reverse it.
That's why I offered.
Sounds like what I needed
But where's to get a counter?
And where would it displays?
That's the genius part.
See, it doesnt need to output a value to a display because the rotating number wheel would store it in parallel.
Since the number wheel is rotating, and mirrors it by being at an angle
- turn on loop that increments counter
- turn on rotation of clock
- Both are now synchronized
- the clock is the display
- the counter is for logic
That's about wheel solution. What about electronic clock? Could it be done with that entity?
Hmmm. Seems difficult.
Hehe
Do you have textures for the display?
Not really
That's probably the first issue lmao
Though I think there are sprites for it.
My answer would be "you need lua"
😦
You could also compromise and just make a traditional clock with two hands.
That's straighforward.
Do you want me to make a analogue clock and send it to you so you can dissect it?
No if we talking about classic rotating clocks cuz I can figure out by myself how to make it
Here's the reason I'm here: I'm mostly needs electronic clock
Hmmmmm.
It is possible, but it will be ugly and tedious
Like, I can think of some really hacky ways to do it with hammer parts
It's desirable to make it without using changing vtm :)
That's thelast way I'll go if there would be no other
Yea, that's bad idea as you said
Would you be fine with a wheel-based clock but the numbers glowed?
It's better to don't use that
UGHHH
Is this clock 4 digits?
If it's a low amount of digits we can start using more brute force methods.
Ye, likely this
You could make an event output for individual digit changes.
That would leave you with probably 1 timer and 40 outputs to write.
Oh hell
The problem is that gonna load my map
I don't think that would be an issue
Many maps have a lot of I/O connections
Like I would guess that the average tf2 map has at least 100.
Then you don't know really how many timers do I need lol
Not timers.
Outputs.
The timer would only exist so the clock could reset.
Assuming that's what you want it to do.
Nah. I mean I need more than one
Like up to 10, please don't ask why
I'm about timers now
Oh.
Why do you need all of those?
Oh right you ask-
IM ASKING ANYWAY
TELL ME
I don't know why you'd need so many
Aight
Ye I needed it to let people know when the next train, it should be located at the stations 
That's the last message I'll send till I gotta sleep
BB
If you want me to come back some other time ping me, I'm letting myself forget this weirdness.
hello. I need some help with a filter_name. Can you help me?
Alright, what's the briefing?
the doors aren't working as well
I'm using filter_name and trigger_mulltiple. in a second one I've used "lock" command
can it be angles problem?
For debugging these things, you can type developer 3 in the console to get a text readout of what your circuit is doing
That should also tell you if anything happens to go nowhere.
Try using that, and then triggering your setup
yea man, it says doors are opening
(58.69) output: (trigger_multiple,) -> (r1rd,Lock,10.0)()
(58.69) output: (trigger_multiple,) -> (r1rd,Unlock)()
(58.69) output: (trigger_multiple,) -> (r1ld,Lock,10.0)()
(58.69) output: (trigger_multiple,) -> (r1ld,Unlock)()
(58.69) output: (trigger_multiple,) -> (r1c3,Resume,12.0)()
(58.69) output: (trigger_multiple,) -> (r1c3,Stop)()
(58.69) input : r1rd.Unlock() (x4)
(58.69) input : r1ld.Unlock() (x4)
(58.69) input : r1c3.Stop()
what's the problem then?
How exactly did you use this filter?
It would also be appreciated to screenshot the I/O windows
please hold on a minute
r1c3 - tanktrain
i'm here
where are you?
bro I got few mins left
it's named r1c3
I'm not sure
I'll just look up the wiki for it I guess
like I'm using OnTrigger output
filter_activator_name has an output for things that pass
Instead of linking it from r1c3 to the tanktrain, try r1filt -> "onpass" -> tanktrain
I'm using it in trigger_muptiple, in Filter Name string
wait bro
that's what Im doing
there's an entity filter_activator_name
but the only info it have is this
that's the screenshot of that entity
Can you screenshot the I/O going from the trigger_multiple to the filter name please?
You're using the TestActivator input right?
no?
by name ig?
there's no I/O between multi and filter
oh shoot
The name filter is supposed to rigged like a checkpoint.
I'm not sure I understood what to do
Rather than a surrogate creature
You need to get the trigger to feed the name filter the entity you want to test, and then it will branch into pass or fail
Then you link the pass ouput to the input onwards
da strange thing about that is that one part of trigger works and one doesn't
like the doors aren't opens but tanktrain stops
I would expect you to feed onstarttouch to testactivator
It isn't obvious that it passed the entity, but throughout this process, the original activator of any event is stored and can be read.
So the name filter can dig up the root cause of these events, and go "time to test your name, perpetrator!"
Wait. What the difference between unlock/lock and open/close?
What inputs are for func_door?
It can be the problem
There are both options
Hmm what does that means?
I've used lock and unlock
So maybe that's my error, maybe I want to use close/open
And maybe there we go
To make doors opens and closes
Right, I see.
That's just the train doors
When do the doors need to open?
OnTrigger ig
Alr lemme turn on my laptop and check the version about open/close
Btw why don't you want to chat in DM?
Map is compiling, it gotta take a minute to check
Setting compile modes to fast often makes it only a few seconds for me
Good for debugging
You could just have the doors open whenever somebody touches them, and locked whenever the train is about to move
Next time when someone asks how to make doors closes and opens just tell em to send you multi's outputs
It's gotta be automatic
Wait
It's already works and automatic 
There exists a simple flag for doors which makes them open when you bump into them
Fair enough, I think I understand why you need the trigger now