Firstly, I'm making some new spells. Everything works fine, the spell works if I use a spawner, but when I try to have the party cast it, I get an error. This script is something I sort of pieced together from other people's custom spells, so its probably not exactly what's needed, and I get an error under the shootProjectile component.
SpoilerShow
defineSpell{
name = "meteor",
uiName = "Meteor",
gesture = 145236,
manaCost = 60,
skill = "fire_magic",
requirements = { "fire_magic", 5 },
icon = 61,
spellIcon = 7,
onCast = function(champion, x, y, direction, elevation, skillLevel)
local dx,dy = getForward(party.facing)
playSound("fireball_launch")
shootProjectile("meteor", party.level, party.x+dx, party.y+dy, direction, 10, 0, 0, 0, 0, 0, 0, nil, true)
end
}
name = "meteor",
uiName = "Meteor",
gesture = 145236,
manaCost = 60,
skill = "fire_magic",
requirements = { "fire_magic", 5 },
icon = 61,
spellIcon = 7,
onCast = function(champion, x, y, direction, elevation, skillLevel)
local dx,dy = getForward(party.facing)
playSound("fireball_launch")
shootProjectile("meteor", party.level, party.x+dx, party.y+dy, direction, 10, 0, 0, 0, 0, 0, 0, nil, true)
end
}
SpoilerShow
class = "Item",
uiName = "Ceremonial Dagger",
gfxAtlas = "mod_assets/textures/gui/my_items_1.dds",
gfxIndex = 6,
gfxIndexPowerAttack = 7,
impactSound = "impact_blade",
weight = 2.5,
secondaryAction = "leech",
traits = { "light_weapon", "dagger" },
uiName = "Ceremonial Dagger",
gfxAtlas = "mod_assets/textures/gui/my_items_1.dds",
gfxIndex = 6,
gfxIndexPowerAttack = 7,
impactSound = "impact_blade",
weight = 2.5,
secondaryAction = "leech",
traits = { "light_weapon", "dagger" },
