Detect enchantment on actor

Post » Thu Jan 10, 2013 4:17 am

This might be common knowledge, but I had no idea we could do this. I thought I might post it just in case.

I've been chipping away at a problem where I needed a script on an actor to detect an enchantment. Turns out that enchantments are "equipped".

Scriptname ActorAliasScript extends ReferenceAliasEnchantment Property TheEnchantmentToTestFor AutoEvent OnObjectEquipped( Form akBaseObject, ObjectReference akReference )	if ( akBaseObject as Enchantment ) == TheEnchantmentToTestFor	    ;42	endifEndEvent

Solved my problem it did.
User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am

Return to V - Skyrim