(Gonna use it so when you kill all enemys, they all respawn)
edited 1×, last 24.08.11 07:25:07 pm
Scripts
How do you check if there are no enteties alive?
How do you check if there are no enteties alive?
1

addhook("always","_always")
npcs=false
function _always()
	npcs=false
	for _,id in ipairs(object(0,"table")) do
		if object(id,"type")==30 then
			npcs=true
		end
	end
	if npcs==false then
		msg("no enemies")
	else
		msg("there are enemies")
	end
end
1
