Jump to content

Recommended Posts

Posted
You all are wonderful! I got it working! The only problem left is that the reanimated actors are hostile to the player, because they basically reanimated themselves. Hopefully I can solve this with a faction line in the code. Anyways, thanks so much, and I hope you all have a wonderful day filled with pie and rainbows.
Posted (edited)
  On 2/18/2012 at 7:25 PM, Jugg3r said:

Please post the final code, would be nice to see how you got it running :)

 

Sure! It's below. As it turns out, most of the problems had to do with the property definitions, so I had to rework the Revenant spell to run 'on contact' instead of 'aimed.'

 

Scriptname EncEldingarEffectScript extends ActiveMagicEffect  

Spell Property Revenant Auto

Faction Property DunPlayerAllyFaction Auto

Event OnDeath (Actor akKiller)

int random = Utility.RandomInt()

if random >= 75

	Actor TargetActor = GetTargetActor()

	TargetActor.RemoveFromAllFactions()

	TargetActor.AddToFaction (DunPlayerAllyFaction)

	Utility.Wait(2)

	Revenant.cast (TargetActor, akTarget = TargetActor)

endif

EndEvent

Edited by amblingalong
  • Recently Browsing   0 members

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