Northnorial
Member
I edited the script a bit (So you can set a textcolor for each position also), I used it like that:
Tested on TFS 0.3.6pl1
Code:
local text = {
[1] = {pos = {100,100,7}, text = {"Town1"}, color = {TEXTCOLOR_GREEN}},
[2] = {pos = {100,100,7}, text = {"Town2"}, color = {TEXTCOLOR_GREEN}},
[3] = {pos = {100,100,7}, text = {"Town3"}, color = {TEXTCOLOR_GREEN}}
}
local effects = {
[1] = {pos = {100,100,7}, effect = {CONST_ME_MAGIC_RED}},
[2] = {pos = {100,100,7}, effect = {CONST_ME_MAGIC_RED}},
[3] = {pos = {100,100,7}, effect = {CONST_ME_MAGIC_RED}}
}
function onThink(interval, lastExecution)
for _, area in pairs(text) do
doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], area.color[1])
end
for _, area in pairs(effects) do
doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
end
return TRUE
end