...so THAT'S why I can't make a CS:S C4 explosive with E2! Thanks!
But...wait...do you just slap it on the end of the file...or what?
Ok the clk timer comand is all well and good if just want too see if a timer is being called.
Now what if you want to get, any timer that's being called and its name.
Well to my knowledge there's noway to do this right now, shot of testing for all the timer names that your going to use in your E2 code, and thats to mini if statements.
So this is the code that need to be add in the timer.lua file:
Code:registerFunction("runner", "", "s", function(self, args) if runner == nil then return "" else return runner end end)
...so THAT'S why I can't make a CS:S C4 explosive with E2! Thanks!
But...wait...do you just slap it on the end of the file...or what?
Still very clueless about code in general.
92% of teens have moved onto rap. If you are part of the 8% that still listen to real music, copy and paste this into your signature.
Very useful, but I like how you suggested this 6 hours after I did
Make clk() return name of timer
And it's been suggested and coded a few times before:
http://www.wiremod.com/forum/e2-deve...per-runby.html
http://www.wiremod.com/forum/e2-deve...ntityvars.html
Code:registerFunction("clk", "s", "n", function(self, args) local op1 = args[2] local rv1 = op1[1](self, op1) if runner == rv1 then return 1 else return 0 end end) <<<<<<<<<<<goes right here in the file /******************************************************************************/
no, the reason for that is that you're a noob
[highlight=E2]@name CrapStrike bomb
@inputs Active
@outputs Seconds
if (~Active) {
if (Active) {
Seconds = 30
interval(1000)
}
else {
Seconds = 0
stoptimer("interval")
}
}
if (clk()) {
Seconds--
if (Seconds) { interval(1000) }
}[/highlight]
You can even do that with gates, but that's a lot harder
"It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup
Lífið læðist lúmskt áfram
Bookmarks