Jump to content

[LE] Active Magic Effect Script to add 3 diseases mot working


morrowind1979

Recommended Posts

I am trying to modify the chaurus poison spit spell to add Bonebreak fever, Rockjoint and Brainrot to the player every time teh projectile hits the player. When the spellhits teh player ingame the 3 messages are displayed saying the 3 disease spells have been added but when I check the active magic effects in the UI no diseases are present or only one disease showsin the UI and once cure them with a cure disease potion the diseases are nolonger appliedto the player when the projectile hits. Here is my script:

Scriptname DMPestilenceSpellScript extends ActiveMagicEffect  

;======================================================================================;
;               PROPERTIES  /
;=============/

ImageSpaceModifier property OnStartImodFX auto
{main isMod for spell (MUST BE ANIMATED IMOD)}
ImageSpaceModifier property OnFinishImodFX auto
{Optional ending Imod for spell (MUST BE ANIMATED IMOD)}

SPELL Property DS1 Auto
SPELL Property DS2 Auto
SPELL Property DS3 Auto

Float Property fImodStrength = 1.0 auto
{IsMod Strength from 0.0 to 1.0}

bool bPlayerOnly
Bool bIsOkToPlay
actor TargetActor
actor CasterActor
;======================================================================================;
;	 EVENTS     /
;=============/


Event OnEffectStart(Actor Target, Actor Caster)
	TargetActor = Target
	CasterActor = Caster
	
	if TargetActor == game.GetPlayer()
		OnStartImodFX.apply(fImodStrength)
		utility.wait(5.0)
		bIsOkToPlay = True
	endif

EndEvent

Event OnEffectFinish(Actor Target, Actor Caster)
		game.GetPlayer().addspell(DS1)
		game.GetPlayer().addspell(DS2)
		game.GetPlayer().addspell(DS3)
	if bIsOkToPlay
		if OnFinishImodFX
			OnFinishImodFX.apply(fImodStrength) 
		endif
	endif
endEvent

Does anyone know whats wrong?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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