Forum

> > CS2D > Maps/Editor > Unbreakable Turret
Forums overviewCS2D overview Maps/Editor overviewLog in to reply

English Unbreakable Turret

2 replies
To the start Previous 1 Next To the start

old Unbreakable Turret

Jenko63
User Off Offline

Quote
Hello i just want to know how to make an unbreakable turret, for example: when the turret gets explodes, he will rebuild itself after 1 sec or something like that

Any help in this?

old Re: Unbreakable Turret

Cure Pikachu
User Off Offline

Quote
You have cs2d lua hook objectdamage, so:
1
2
3
4
5
6
7
addhook("objectdamage","objdmg")
function objdmg(oid)
	local t = object(oid,"type")
	if t == 8 or t == 11 or t == 12 then
		return 1
	end
end
To the start Previous 1 Next To the start
Log in to reply Maps/Editor overviewCS2D overviewForums overview