whitevo
Feeling good, thats what I do.
I have been trying hours to figure out why it causing me crash. Perhaps someone here can help me look to right direction.
What happens is: when my monster precast spells and monster himself is removed after that, server crashes.
Before my latest update. Only thing what changed was: The channeling spell damage came from no source.
With the latest update I added: Spell can have multiple startpoints and spell can change target(s)/and positions.
Monster AI now uses same functions to check what does spellCasting use, to check if there is any point to cast spell (finds target if required)
*change stance removes the caster and creates new monster. (thats why the monster is removed in first place.)
error picture:
Line 743 = print(spellName.." by: "..monster:getName().." has been executed")
and part of monster AI what channels spell AKA makes premade spells
What happens is: when my monster precast spells and monster himself is removed after that, server crashes.
Before my latest update. Only thing what changed was: The channeling spell damage came from no source.
With the latest update I added: Spell can have multiple startpoints and spell can change target(s)/and positions.
Monster AI now uses same functions to check what does spellCasting use, to check if there is any point to cast spell (finds target if required)
*change stance removes the caster and creates new monster. (thats why the monster is removed in first place.)
error picture:
Line 743 = print(spellName.." by: "..monster:getName().." has been executed")
Code:
function castSpell(monster, spellName)
if not monster then
print("caster puudub WTF?? IN castSpell()")
return true end
if not monster:getName() then print("did i make it happen?")
return true end
print(spellName.." and caster is: "..monster:getName())
local spell = ultimateSpellTable[spellName]
local positionTable = spell["position"]
local targetTable = spell["target"]
local targetList = {}
if not positionTable then
local newTargets = ultimateTargetList(monster, targetTable)
for x=1, #newTargets do
table.insert(targetList, newTargets[x])
end
ultimateCastSpell(monster, spell, targetList, nil, nil, spell.spellInterval)
else
local spellStartPos, positions = ultimateCreatePositions(monster, positionTable)
for x=1, #spellStartPos do
local newTargets = ultimateTargetList(monster, targetTable, positions[x])
for n=1, #newTargets do
table.insert(targetList, newTargets[n])
end
ultimateCastSpell(monster, spell, targetList[x], positions[x], spellStartPos[x], spell.spellInterval)
end
end
if not monster then print("did i make it happen2/!?")
return true end
print(spellName.." by: "..monster:getName().." has been executed")
end
and part of monster AI what channels spell AKA makes premade spells
Code:
if spellTable.interval then
local duration = spellTable.interval
while spellTable.spellLockCooldown*1000 > duration do
addEvent(castSpell, duration-spellTable.interval, monster, spellName)
duration = duration+spellTable.interval
end
else castSpell(monster, spellName)
end
Last edited: