Well I didn't really mean moving, I meant zooming. It's supposed to zoom randomly between .8 and 1.. Not too big of a change I suppose, but it makes a little flicker and looks better than just a still light.
Also edit, here's what I cooked up after your function PIE comment, and also I took the randomly zooming part out. This seems to be a stable lamp script apart from not zooming...
PHP Code:
// NPC Created by Oinkness
function onTimeout(){
DoLamp();
}
function onCreated(){
setimgpart("lampanimation.gif",0,0,19,35);
dontblock();
setTimer(.5);
}
function DoLamp(){
showimg(1,"light2.png",x-3,y-3);
changeimgcolors(1,1,0.4,0,0.4);
changeimgzoom(1,2);
}
It works, but are there errors? And how exactly would I incorporate the random zoom within the changeimgzoom section?
Wait, there's no need for //#CLIENTSIDE? I thought I'd forgot it but it kills the script if I put it in.