Jump to content

Kill Script for a weapon?


SteveBob7

Recommended Posts

I think this is reachable by putting a magic effect on the weapon.

 

Then putting a script on the magic effect, something like

 

OnEffectStart(Actor akTarget, Actor akCaster)
     akTarget.Kill()
EndEvent

 

Thanks but can I not just put "OnHit" or something to make it simpler?

Link to comment
Share on other sites

The OnHit event has to be placed on the NPC receiving the damage.

 

So unless you plan to put the same script on every single NPC ingame, you can't use it.

 

The above script will instead be attached on a magic effect.

 

Then the effect will be part of an enchantment.

 

Finally the enchantment attached to the weapon.

 

By default the "spells" on weapons fire when you swing an enemy, so the "oneffectstart" is for this purpose.

Link to comment
Share on other sites

You might also want to add a command to disable essential NPCs immortality.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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