Why does this crash Dream seeker? in Developer Help
|
|
Code:
mob verb test() set src in view()
var/image/i = image('color.dmi', locate(1,1,1), "pink") var/counter = 25 var/flip = 1 src.client.images += i i.icon += rgb(0,0,0,155) spawn while(src) if(flip) i.icon += rgb(10,0,0) else i.icon -= rgb(10,0,0) sleep(0.1) counter -- if(counter <= 0) counter = 25 if(flip) flip = 0 else flip = 1 sleep(1)
|
Problem description:
Yes, I realize this isn't good code etiquette or even objectively useful but for the sake of understanding, please answer specifically the question I am asking.
|
sleep() and other time related functions are in the scale of 1/10 of a second (a tick), NOT in seconds (1 sec = 10 ticks, 1 min = 600 ticks)... well, assuming that world.tick_lag (or whatever is called) was not modified.