Jump to content

Spread Disease Script


HeToC

Recommended Posts

Hi guys.

 

I'd like to add new spell to the game and i'm stuck and need your help.

 

I'm trying to implement 2 features:

1) adding a script to spread magic effect when diseased target dies.

2) adding a spell that just spreads magic affect on current target to nearby enemies.

 

Please guide me how this can be implemented,

and i'll appreciate you for sharing Papyrus script if you have one.

 

Sincerely yours.

Link to comment
Share on other sites

Uhm, i'm thinking about an AoE spell for the 1).

 

You'll need to set the disease effect on a AoE spell.

 

Then put a script on the original magic effect with a OnEffectFinish event (i assume the effect ends when the target dies?)

 

Then in the same script put a akTarget.DoCombatSpellApply(), without specifying a target since it is a AoE spell.

 

I'm not sure about it, but the script i have in mind should be:

 

Spell property DiseaseSpell auto

MagicEffect property DiseaseEffect auto

Event OnEffectFinish(Actor akTarget, Actor akCaster)
     akTarget.DoCombatSpellApply(DiseaseSpell)
EndEvent

 

Fill the properties with the Magic Effect and the Spell.

 

But this should fire the AoE spell everytime the effect ends, so even if the target it still alive.

 

For the 2), you can do the same as above but instead use OnEffectStart event, so everytime you hit someone, the AoE spell will be fired.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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