Simple lib by Yonderboi with many useful functions.
I have the rights to publish it here.
The following functions exist:
-- Functions
run_once(fn, args) --runs the the function "fn" ONE time
run_many(count, fn, args) --runs the function "fn" "count" TIMES
run_every(interval, fn, args) --runs the function "fn" EVERY "interval" seconds
run_later(seconds, fn, args) --runs the function "fn" ONE time in "seconds" seconds
run_at(clock, fn, args) --runs the function "fn" ONE time at "clock"(Game Time in seconds + Ping)
run_until(fn, args) --run fn until it returns true
run_while(fn, args) --run fn until untilfn returns true
run_until2(untilfn, fn, args) --run fn until untilfn returns true
run_while2(whilefn, fn, args) --run fn while whilefn returns true
run_check(fn, args) --if args are passed, then they are used in latest fn-call, else original args are used
-- Resets
run_many_reset(count, fn, args)
run_every_reset(interval, fn, args)
run_later_reset(seconds, fn, args)
run_at_reset(clock, fn, args)
run_until_reset(fn, args)
run_while_reset(fn, args)
run_until2_reset(untilfn, fn, args)
run_while2_reset(whilefn, fn, args)
Download: https://github.com/M...y/runrunrun.lua
Note: Fn = function not function(), f.e. run_once(print("Hi") better do: run_once(print, "Hi")
Sign In
Create Account

Back to top
Report









