Is there any way you can randomize the spell area for each time casting an spell?
For example I have 3 areas setup like this:
And i want to randomize between these 3, i tried using: (and a lot others)
But since that only combat type will load during start, it will always throw the same area.
To make it even more complicated, this is actually a weapon script, so the statements Ive done might actually not be true for spells.
For example I have 3 areas setup like this:
Lua:
local area = {
{
{1, 1, 1},
{1, 3, 1},
{1, 1, 1}
},{
{0, 0, 0},
{0, 3, 0},
{0, 0, 0}
},{
{1, 1, 1, 1, 1},
{1, 1, 1, 1, 1},
{1, 1, 3, 1 ,1},
{1, 1, 1, 1, 1},
{1, 1, 1, 1, 1}
}}
And i want to randomize between these 3, i tried using: (and a lot others)
Code:
combat:setArea(createCombatArea(area[math.random(1,3)]))
To make it even more complicated, this is actually a weapon script, so the statements Ive done might actually not be true for spells.