Jump to content

Custom NPC won't use custom spell


Recommended Posts

Been making an NPC as a boss for a mod that I've been working on, but for some reason he won't cast a spell that I created. The spell is supposed to give the user a buff in a bunch of stats and a sun cloak. I tried the armor effect workaround but that isn't working. For reference, I made his class a Spellsword and his arsenal includes the Dawnbreaker, the buff spell, which is supposed to be classed as Alteration, and the Incinerate spell.

Link to comment
Share on other sites

- Does the npc have enough 'Magicka' to cast the spell ?

- Does the npc have a high enough school of magic that corresponds to the spells school of magic lvl casting ?

- Npcs with the class "Spellsword" will only cast spells from their right hand, if they are holding a weapon, does your spell have the required hand casting ?

Link to comment
Share on other sites

 

- Does the npc have enough 'Magicka' to cast the spell ?
- Does the npc have a high enough school of magic that corresponds to the spells school of magic lvl casting ?
- Npcs with the class "Spellsword" will only cast spells from their right hand, if they are holding a weapon, does your spell have the required hand casting ?

 

 

- He has more than enough to cast it.

- His required schools to cast all of his spells are 100.

- Making him a Spellsword sounds like the problem, I want him to cast this spell at the beginning of the fight as if it's an armor spell like Oakflesh. What's a better class to use in this case? Forgot to mention, but it's a two handed spell, I might have to adjust that to give him an exclusive version of the spell I created to be cast in either hand instead of both.

Link to comment
Share on other sites

One way you can do this is to add him a combat package.

I'm not in front of my PC, but if i remember correctly should be something like this.

- do combat apply spell (package) > assign spell

condition on the package

- IsInCombat == 1 (run on target)


I hope it helps.

Link to comment
Share on other sites

Before making him a package try this:

In your spell add the condition

- IsInCombat == 1 (run on target)


The priority of the spellcasting though, it's handle by the npc's AI + combat class, if not immediately while in combat eventually he will cast it.

Link to comment
Share on other sites

Daft thought, but I've had it. does he have animations to cast spells and can he cast it from the hand you specify?

 

Some NPCs (depending who you based him on) can't cast anything other than 'Left Hand spells'. Oops, Maxarturo already asked about the left-hand, right-hand thing. The animations are new, though.

 

I've even had difficulties with NPCs who had animations to , say, use a shield, but if I gave them one, they wouldn't equip it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...