Please, no bad comment.
Forum
Scripts
How to make free image lua?
How to make free image lua?
4 replies
1

Please, no bad comment.
If you mean rotate, then yes,
imagepos (rot).If you mean freeing an image,
freeimage. like the famous kbg2d?
Apache uwu: I'm guessing he wants to make an image script with who you can make images appear. Exactly as an Env_Sprite would do. Except, you'd have a command for it. /setimage <x> <y> <image> Or something like that.I don't really see why he would need a script, if he can just use the map editor.
@
brofistmsia: You mean the infamous kbg2d 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
img = {}
addhook("say","makeimg")
function makeimg(id,t)
	if string.sub(1,4) == "!img" then
		img[id]=image("gfx/yourfolder/"..string.sub(6)..".png",0,0,0)
	elseif string.sub(1,4) == "!pos" then
		if img[id]~= nil then
			imagepos(img[id],player(id,"x"),player(id,"y),0)
		else
			msg2(id,"You're trying to move a non existing image")
		end
	elseif string.sub(1,5) == "!free" then
		if img[id]~= nil then
			freeimage(img[id])
		end
	end
end
1

Offline