Jump to content

CK Magic Effect Scripting Issue


Dyiing

Recommended Posts

Posted

Hi!

I'm trying to add a dummy spell to the player after the active magic effect wears off, however it seems that my script is not being loaded properly. Here's my script below.

 

Scriptname DYI_TestCoolScript extends ActiveMagicEffect

Spell Property dummySpell Auto

Event OnEffectFinish(Actor Target, Actor Caster)
	Debug.Notification("Effect Ending...")
	Game.GetPlayer().AddSpell(dummySpell, false)
endEvent

 

The code compiles like it's supposed to, however nothing happens in-game. I tried debugging with OnEffectStart, OnUpdate, and OnInit also, but nothing ever got called. No errors in the Papyrus log either.

 

There's two other scripts on my magic effect that also call OnEffectFinish(). I added a debug message to these scripts and they work perfectly fine. I tried copying one of the scripts + properties to a new script but that did not work.

 

I'm not sure why the vanilla scripts work but my script will not work. Any tips are appreciated. More information can be provided.

Here is a screenshot of my magic effect settings: https://prnt.sc/1rufly9

Posted

Looks like a copy of the vanilla Slow Time script, did you also properly adjust the Values of the Spell?

Is the correct Magic Effect called? If its a copy and only yours doesnt fire, perhaps you forgot to set the Magic Effect of the copied Spell to apply your own custom one rather than the Vanilla Slow Time one

Posted
3 hours ago, Scrab said:

Looks like a copy of the vanilla Slow Time script, did you also properly adjust the Values of the Spell?

 

That's correct. I'm looking to turn it into a lesser power.

 

3 hours ago, Scrab said:

Is the correct Magic Effect called? If its a copy and only yours doesnt fire, perhaps you forgot to set the Magic Effect of the copied Spell to apply your own custom one rather than the Vanilla Slow Time one

 

Wow, this is actually super embarrasing, but I somehow forgot to change the magic effect on the spell. I changed the dummy but not the initial spell.. *facepalm*

 

Thanks lol!

 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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