Scripting Problem with custom Spells
Posted: Sun Nov 05, 2017 9:45 pm
Hey Guys.
I imported a few Spells from Grimworld. They work great and are awesome. But however.. I am not able to make the following item script work because the program shuts down after trying.
This works fine with non imported spells tho.
Does anyone know the reason of the cash and how i can solve it?
Cheers, Resu
I imported a few Spells from Grimworld. They work great and are awesome. But however.. I am not able to make the following item script work because the program shuts down after trying.
SpoilerShow
defineObject{
name = "party",
class = "Party",
editorIcon = 32,
onAttack = function(champ, weapon)
if (weapon ~= nil) and (weapon.name == "sword_of_exmple") then
if party.facing == 0 then
spawn("fire_storm", party.level, party.x, party.y-1, party.facing)
end
if party.facing == 1 then
spawn("fire_storm", party.level, party.x+1, party.y, party.facing)
end
if party.facing == 2 then
spawn("fire_storm", party.level, party.x, party.y+1, party.facing)
end
if party.facing == 3 then
spawn("fire_storm", party.level, party.x-1, party.y, party.facing)
end
end
name = "party",
class = "Party",
editorIcon = 32,
onAttack = function(champ, weapon)
if (weapon ~= nil) and (weapon.name == "sword_of_exmple") then
if party.facing == 0 then
spawn("fire_storm", party.level, party.x, party.y-1, party.facing)
end
if party.facing == 1 then
spawn("fire_storm", party.level, party.x+1, party.y, party.facing)
end
if party.facing == 2 then
spawn("fire_storm", party.level, party.x, party.y+1, party.facing)
end
if party.facing == 3 then
spawn("fire_storm", party.level, party.x-1, party.y, party.facing)
end
end
Does anyone know the reason of the cash and how i can solve it?
Cheers, Resu