Forum

> > CS2D > Scripts > Zombie script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Zombie script

21 replies
Page
To the start Previous 1 2 Next To the start

old Re: Zombie script

MikuAuahDark
User Off Offline

Quote
It's fixed now
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
imgs={}
for id = 1,32 do
imgs[id]=0
end

tilepenghilang = {114,85}

addhook("movetile","_movetile")
function _movetile(id,tx,ty)
	for _, tiles in pairs(tilepenghilang) do
		if tile(tx,ty,"frame")~=tiles then
			if imgs[id]==0 then
				imgs[id]=image("imagepath",1,0,132+id)
			end
		elseif tile(tx,ty,"frame")==tiles then
			if imgs[id]>0 then
				freeimage(imgs[id])
				imgs[id]=0
			end
		end
	end
end

old Re: Zombie script

Autumn
User Off Offline

Quote
The image is removed only from a tile #85,and on a tile#114 it comes back.And I need to removed it on the tile#85 and #114.
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview