He,
How to create a script, when I building Wall III then spawn a picture on Wall III. And when I kill Wall III, a picture disappear.
picture = a picture of the wall
2× editiert, zuletzt 31.08.12 09:58:31
buildings = {} imagepath= "gfx/food.bmp" addhook('build','build') function build(id,type,x,y,mode,objectid) 	if type == 5 then 		table.insert(buildings,{image(imagepath,x*32+16,y*32+16,3),objectid}) 	end end addhook('objectkill','objectkill') function objectkill(id,pl) 	for n,w in pairs (buildings) do 		if w[2]+1== id then 			freeimage(w[1]) 			table.remove(buildings,n) 		end 	end end