ok so i'm no programmer so i'm not sure if there was an easy way to do this or not and it took me a bit of trial and error but this works so it'll do
basically you place the zone and give it this script and then
name it the entity numbers of the objects you wish to destroy (these can be found by hovering over them in the editor) and separate each entity number with a comma ,
like this
1,2,5,7,10,53,200,704
etc
(only works up to object number 9999, i dont think you'll be placing more than that)
destroy_zone.lua
local max_b = 0
local letter = {}
zone_name = {}
local a = 0
local b = 0
local previous = 0
local number_of_letters = 0
function destroy_zone_init_name(e,name)
zone_name[e] = name
end
function destroy_zone_main(e)
if GetPlayerInZone(e) == 1 then
repeat
a = a + 1
if string.byte(zone_name[e],a) ~= nil then
if string.byte(zone_name[e],a) ~= 44 then
if previous == 0 then
b = b + 1
max_b = b
letter[b] = string.char(string.byte(zone_name[e],a))
previous = 1
elseif previous == 1 then
letter[b] = string.char(string.byte(zone_name[e],a-1))..string.char(string.byte(zone_name[e],a))
previous = 2
elseif previous == 2 then
letter[b] = string.char(string.byte(zone_name[e],a-2))..string.char(string.byte(zone_name[e],a-1))..string.char(string.byte(zone_name[e],a))
previous = 3
elseif previous == 3 then
letter[b] = string.char(string.byte(zone_name[e],a-3))..string.char(string.byte(zone_name[e],a-2))..string.char(string.byte(zone_name[e],a-1))..string.char(string.byte(zone_name[e],a))
previous = 4
end
number_of_letters = a
else
previous = 0
end
end
until string.byte(zone_name[e],a) == nil
local x = 2
for a = 1,max_b do
--Text(x,2,3,letter[a])
--Hide(letter[a])
Destroy(letter[a])
x = x + 5
end
Destroy(e)
else
a = 0
b = 0
end
--Prompt(number_of_letters)
end --main
function destroy_zone_exit(e)
end
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11