Kgb2d.com - International Gaming Community
Self Repeating Function - Printable Version

+- Kgb2d.com - International Gaming Community (https://kgb2d.com)
+-- Forum: Game Universe (https://kgb2d.com/Forum-Game-Universe)
+--- Forum: CS2D (https://kgb2d.com/Forum-CS2D)
+---- Forum: File Archive (https://kgb2d.com/Forum-File-Archive)
+----- Forum: Lua Scripts (https://kgb2d.com/Forum-Lua-Scripts)
+----- Thread: Self Repeating Function (/Thread-Self-Repeating-Function)



Self Repeating Function - BcY - 22-08-2019

You can use the idea to create ie. your own second hook, ms100 hook, always hook etc. Whatever comes to your imagination.

Code:
function _selfrepeat()

print("repeating..")

timer(1000,"_selfrepeat") --repeats itself every second

end

_selfrepeat() --started the function because it's an unique function and won't start if we do not trigger it