Jump to content

[LE] Infectious Spell


mitchelljs

Recommended Posts

Hello all,

 

Currently, I'm trying to make a spell that (1) spawns a hazard that (2) infects npcs that hit it with a disease that (3) will infect other NPCs that come near the infected individual(s).

 

My main approach to the spread is via scripted cloak spells. Currently I have the following:

 

- HazardSpell that spawns hazard (this works; although it won't spawn on the ground, just on activators / NPCs, which is annoying)

- HazardObj that applies a...

- DiseaseSpell with two parts: a damage over time effect, and a cloak effect (both Fire-and-Forget on Contact; this works, NPCs that hit the hazard get the DoT and the cloak). The cloak applies a...

- CloakSpell (effect: Script archetype, Aimed, Concentration; spell: applies effect, magnitude 15, duration 120s) that has an attached script that uses akCaster.DoCombatSpellApply(DiseaseSpell, akTarget) to apply the disease spell to any NPCs that get too close to the infected individual (the property referring to the disease spell is set)

The last step...does not work. NPCs who hit the hazard gain the DoT (they slowly lose health), and the Cloak (they show the visual effect only present on the cloak magic effect). The cloak has CloakSpell as the associated item, and the DiseaseSpell property in the script is filled. But it doesn't transfer. Only NPCs that hit the hazard get the disease, not NPCs who get too close to infected individuals.
I feel like I'm missing something obvious, but I've been bashing my head at it for awhile to no avail. Any help getting the cloak effect to successfully pass the disease would be greatly appreciated.
Edited by mitchelljs
Link to comment
Share on other sites

Set the associated item to the disease spell, and not the cloak spell. Then you don't even need a script to apply the disease, the cloak should apply it for you.

 

Hm, that's a good idea! I seem to have screwed up the implementation somehow, though. I made a version of the disease spell that was aimed and concentration based and associated it with the cloak spell, but it isn't transmitting between NPCs during testing.

 

I've got the magnitude of the cloak set to 15 and duration set to 120s (so it should "stick" even after they move away from the infected individuals). I've tried it with No Area check and unchecked.

Edited by mitchelljs
Link to comment
Share on other sites

Ok here's how I would set it up. This disease spell should be fire and forget, delivery self, with two effects. The disease effect which damages over time, and the cloak effect, which also has the same duration. Your associated item 1 spell on the cloak effect should be concentration, aimed - archetype script, so that it doesn't do anything on it's own. Put a script on the magic effect that casts the disease spell on the target.

 

Scriptname TestModMagicEffectB extends ActiveMagicEffect 
;this script is on the DiseaseCloakSpell's associated item spell's MagicEffect

Spell property DiseaseSpell Auto

event oneffectstart(actor akTarget, actor akCaster)
    DiseaseSpell.Cast(akTarget, akTarget) ;target casts disease cloak spell on themselves
endevent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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