Jump to content

[Script] Need help with explosion/Magic Effect


Zorkaz

Recommended Posts

So I have an explosion and there's an enchantment attached to it.

 

I want to run a script via the magic effect but the script just won't work on the target inside the explosion.

 

Any ideas?

 

The MagicEffect is set to FireandForget-Contact

Scriptname ECElectrChairScr extends activemagiceffect

Spell Property CritFire Auto


Event OnEffectStart(Actor akTarget, Actor akCaster)
Actor Victim = AkTarget
CritFire.cast(Victim)
If Victim.isessential()
Victim.setessential(False)
Endif
utility.wait(0.1)
Victim.setprotected(False)
utility.wait(0.1)
Victim.kill()
EndEvent

 

 

Link to comment
Share on other sites

If you are using Archetype->Script, try Archetype->Value Modifier and Assoc. Item->Health. Set magnitude to 0 and without any damage/recover flags, the magic effect shouldn't tamper with the target's health, but maybe it will be able to run the script. Also try a few values for the duration to see if this can change things(0, 1, 10).

Link to comment
Share on other sites

  • 1 month later...

So recently I've been doing some experiments with Object Effect for a weapon. The magic effect was used to run a script, and the script to spawn a harmless explosion at the target - just for sound and light effects. The Archetype and flags of the magic effect seemed to matter somehow for the execution of the script, judging from the fact that the explosion didn't get applied all the time. Best results I had with Archetype->Script and flags - Hostile, Detrimental, No Duration. Magnitude, Area and Duration for this magic effect - leave all at 0.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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