Forum




how to creat a delay.
9 Antworten



1
2
3
4
5
6
2
3
4
5
6
delay = 3 -- delay time in seconds start = os.clock() while (os.clock() ~= start+delay) do 	-- leave this empty, or comment like me. :P end add_newball_function()

1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
function delay_to_new_ball() 	delay = 3 -- delay time in seconds 	start = os.clock() 	while (os.clock() ~= start+delay) do 		-- leave this empty, or comment like me. :P 	end 	add_newball_function() end
CS2D has built-in timers to make your life easier:
see


What DannyDeth said is very dangerous!
you are not the first person to say that about my code before.


That script was too complicated for me.




