Jump to content
ℹ️ Intermittent Download History issues ×

[LE] Apply Combat Hit Spell equivalent in Papyrus?


Recommended Posts

In the Perk entries in the CK, there's the Apply Combat Hit Spell function that can successfully apply a 'lingering' Spell to the player (like you'd find on Falmer weapons thanks to the Perks crFalmerPoison01 to crFalmerPoison05).

 

The Papyrus command DoCombatSpellApply works fine with Spells without duration, but any spells with a duration longer than 0 seconds cause a CTD.

Even when I just change a property that points to a spell without duration - and doesn't CTD - to point to the actual Falmer poison spell, bam, back to the Desktop :(

The logs don't even register anyhting.

 

How can I apply a spell with a duration of more than 0 via Papyrus?

Link to comment
Share on other sites

Instead, you can use Spell.Cast() :https://www.creationkit.com/index.php?title=Cast_-_Spell and if you're using skse you can use SetNthEffectDuration: https://www.creationkit.com/index.php?title=SetNthEffectDuration_-_Spell. I would only use that on custom spells you make yourself though, because that will cause the duration of the spell to change for everyone. If not using skse, you could make multiple spells with multiple durations and cast the applicable spell for the right circumstance.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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