[SOLVED] How do i make a timer in lua?
#2
Use cWorld:ScheduleTask for that.
Something like this:
-- One second is 20 ticks
local callback;
callback = function(a_World)
	-- Spawn a mob
	
	-- Reschedule the callback again.
	a_World:ScheduleTask(20, callback)
end

world:ScheduleTask(20, callback)
Reply
Thanks given by:


Messages In This Thread
[SOLVED] How do i make a timer in lua? - by denwo - 10-19-2016, 10:49 PM
RE: How do i make a timer in lua? - by NiLSPACE - 10-19-2016, 10:53 PM
RE: How do i make a timer in lua? - by denwo - 10-29-2016, 03:16 AM
RE: How do i make a timer in lua? - by xoft - 10-29-2016, 04:05 AM
RE: How do i make a timer in lua? - by denwo - 10-29-2016, 05:42 AM
RE: How do i make a timer in lua? - by PureTryOut - 10-29-2016, 08:49 AM



Users browsing this thread: 1 Guest(s)