Forum

> > CS2D > Scripts > Explode on tile
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Explode on tile

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Explode on tile

X-Files
User Off Offline

Zitieren
whats problem ?

1
2
3
4
5
6
7
8
9
10
addhook("second","maptile") 
function maptile()
for x=0, map("xsize") do
     for y=0, map("ysize") do
	 if tile(x,y,"frame") == 30 then
				parse('explosion ' .. x .. ' ' .. y .. ' 128 40')
	 end
end
end
end

alt Re: Explode on tile

Alistaire
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
addhook("second","maptile") 
function maptile()
for x=0, map("xsize") do
     for y=0, map("ysize") do
	 if tile(x,y,"frame") == 30 then
				parse('explosion ' .. ( x * 32 ) .. ' ' .. ( y * 32 ) .. ' 128 40')
	 end
end
end
end

The explosion parser function uses pixel X and Y positions, so multiply the tile X and Y by 32.

alt Re: Explode on tile

X-Files
User Off Offline

Zitieren
@user Alistaire: seems legit, thanks !

ok another problem
flare showing up in left upper corner why ? anyway to fix ?

IMG:https://oi57.tinypic.com/2m33141.jpg<br>


1
parse('effect "flare" ' .. ( x * 32 ) .. ' ' .. ( y * 32 ) .. ' 100 32 255 128 0')
1× editiert, zuletzt 06.09.14 13:26:47
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht