Forum
Scripts
Object script
Object script
12 replies
1

Trigger = smoke
Gen_FX:
Name = smoke
Env_Breakable:
Trigger = smoke
It's easy. No need for scripts.
1
2
3
4
5
6
2
3
4
5
6
addhook("objectkill","_obj")
function _obj(i,p)
	if object(i,"tilex") == YOUR_ENTITY_POSITION_IN_TILE_X and object(i,"tiley") == YOUR_ENTITY_POSITION_IN_TILE_Y then
		parse("effect smoke "..object(i,"x").." "..object(i,"y").." 5 10")
	end
end
not tested
http://cs2d.com/help.php?cat=all&cmd=effect#cmd
1
2
3
4
2
3
4
addhook("objectkill","lol")
function lol(x,y)
	parse('effect "colorsmoke" '..x..' '..y..' 0 0 255 010 010')
end
I think its work!
EDIT: 40 seconds
Points Env_Breakable (x=33,y=133)
I not so have made?
1
2
3
4
2
3
4
addhook("break","lol")
function lol(x,y)
parse('effect "colorsmoke" '..x..' '..y..' 0 0 255 010 010')
end
objectkill is from wall1, turrets and so on!
1
2
3
4
2
3
4
addhook("break","lol")
function lol(x,y)
parse('effect "smoke" '..(x*32+16)..' '..(y*32+16)..' 32 32')
end
I do believe the problem should be solved.
1
2
3
4
5
6
2
3
4
5
6
addhook("break","lol")
function lol(x,y)
	if x==33 and y==133 then
		parse('effect "smoke" '..(x*32+16)..' '..(y*32+16)..' 32 32')
	end
end
Since breakables are placed constantly in the map, there is no point of using a script to control this. Since your won't be able to move the breakables or add them in game.
1

Offline
