Please help...
Posted: Wed Mar 16, 2016 10:51 pm
Hi, all. So I've recently been experimenting with making custom items and spells, but I've run into some things I need help with. They're probably very simple errors, but I'm relatively new to this whole thing, so I'd greatly appreciate help.
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.
My next issue is probably a much simpler one. I've created a new dagger, and again it all works fine, except the gfxIndex for the power attack. I have it all set up correctly, as far as I can see. the gfxAtlas and Index for the base weapon work fine, but when I charge the power attack, the sprite uses the original Grimrock altas (in this case, the dagger morphs into a peasant's shirt when its charged up). I can't seem to get the gfxIndexPowerAttack to work off the custom atlas I made, but the regular gfxIndex is fine.
Thanks for the help, I apologise if these are really nooby questions, but I'm still learning about this stuff
. Cheers!
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" },