Someone earlier was asking how to spawn spells in an area of effect. Here's the code to do so.
Code: Select all
function frostexplosion()
local fmax = 3
for x = -fmax,fmax do
for y = -fmax,fmax do
if ( (x ~= 0) or (y ~= 0) ) then
spawn("frostbolt_blast", 5, 25 + x, 7 + y, 0)
spawn("frostbolt_blast", 5, 25 + x - 1, 7 + y - 1, 0)
spawn("frostbolt_blast", 5, 25 + x - 2, 7 + y - 2, 0)
spawn("frostbolt_blast", 5, 25, 7, 0)
end
end
end
end
The above code will define a 3 x 3 square. You can modify the shape by changing the +- of the x and y values to be any rectangular shape. You can make it larger or smaller by changing the fmax value.
I do have a question with this. Is there a way to have a spell find the location of a monster or the party and spawn at that location? Would it be possible to also add a delay to this? If so how could it be done?