# HG changeset patch # User Wuzzy # Date 1555503881 -3600 # Node ID 9a54727606321d351074e5910c4deef18af9dd52 # Parent 086bebb89963dd27347b2784ca856c79e35e9eda LuaEvents: move tick events to new section diff -r 086bebb89963 -r 9a5472760632 LuaEvents.wiki --- a/LuaEvents.wiki Wed Apr 17 13:23:52 2019 +0100 +++ b/LuaEvents.wiki Wed Apr 17 13:24:41 2019 +0100 @@ -47,13 +47,14 @@ These indexes can be used to look up details of the clan/team/hedgehog prior to gear creation. Routines to do these lookups will be created as needed. If you add this hook, the expectation is that you will call SetAmmo appropriately. Any values from `onAmmoStoreInit` are ignored. -== Game events == +== Time events == === onGameTick() === This function is called on every game tick, i.e. 1000 times a second. If you just need to check on something periodically, consider `onGameTick20`. === onGameTick20() === This function is called every 20 game ticks, which equals 50 times a second. It reduces Lua overhead for simple monitoring that doesn’t need to happen every single tick. +== Game events == === onNewTurn() === This function calls at the start of every turn. You can set `ReadyTimeLeft` here to change the ready time for this turn. (See also: `Ready`)