General > Developers Corner
Modifying Trouble in Terrorist Town.
Megiddo:
ULib.invisible?
Decicus:
THAT'S IN ULIB!?
Man, I feel a bit stupid, I looked up cloak, but nada. Didn't think about "invisible". Thanks a lot, Megiddo. I should've searched more in ULib about that.
Decicus:
Sort of re-using this thread because it's related to the main topic:
When the round in TTT (well, the modified version of it) begins, it triggers some "ConCommands", and I have multiple of them in fact. I want to put a delay between each ConCommand, but I can't find it while searching Google. I might just be using the wrong keywords, but I still need help with this.
So Lua masters, give me a little boost?
MrPresident:
Try something like this.
--- Code: ---
local timerinterval = 3
timer.Simple( timerinterval * 1, function()
Code to run here
end )
timer.Simple( timerinterval * 2, function()
Code to run here
end )
timer.Simple( timerinterval * 3, function()
Code to run here
end )
timer.Simple( timerinterval * 4, function()
Code to run here
end )
--- End code ---
There are more streamlined ways to do it, but that is the easiest I could think of. All you need to do is make the timerinverval variable at the top how long between the console commands you want. Replace 'Code to run here' with the Console Command code you have currently. For each timer, make sure you increment the multiplication by one. Make more or remove some if you need to.
Decicus:
I think I get it, thanks.
I assume if I want to make them trigger like... 0.1 seconds after each other, I just change "local timerinterval = 3" to "0.1"?
And also, something I forgot to mention, can I make these timers trigger with a hook somehow? It might be pretty simple, but when I looked around about "timer.Simple", I didn't really find anything that helped me.
Navigation
[0] Message Index
[*] Previous page
Go to full version