Jump to content

Script isn't running- help please!


amblingalong

Recommended Posts

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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Recently Browsing   0 members

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