Transfer spells from one actor to another?

Post » Wed Jun 20, 2012 1:20 am

I need to have one actor (a follower) basically stop following you, then a new follower 'enables' and starts following you, and then the new actor gets all of the old actor's spells, except a stronger version. I just can't think of how I would do this.

Basically it is a pokemon evolving, so it gets bigger and meaner looking, and learns more powerful versions of its spells.
User avatar
Jhenna lee Lizama
 
Posts: 3344
Joined: Wed Jun 06, 2007 5:39 am

Post » Tue Jun 19, 2012 11:17 pm

I can think of a way, but it's not going to be pretty if you happen to have a lot of spells:

;;;FormList property WeakSpells autoFormList property StrongSpells autoSpell TempSpell;;;Function SwapSpells(Actor OldRef, Actor NewRef)    int index = WeakSpells.GetSize()        while (index > 0)            index -= 1        TempSpell = WeakSpells.GetAt(index) as Spell        if (OldRef.HasSpell(TempSpell))            TempSpell = StrongSpells.GetAt(index) as Spell            NewRef.AddSpell(TempSpell)        endif        endwhileEndFunction;;;;

This would require you to make a formlist of the weak spells and another of the strong spells. The first entry in the strong spells should be the stronger version of the first entry in the weak spells. The second entry in the strong spells should be the stronger version of the second entry in the weak spells, etc.
User avatar
Emma Parkinson
 
Posts: 3401
Joined: Wed Jul 26, 2006 5:53 pm

Post » Wed Jun 20, 2012 11:30 am

I wound up figuring out something similar on my own. Thanks though!
User avatar
Hannah Barnard
 
Posts: 3421
Joined: Fri Feb 09, 2007 9:42 am


Return to V - Skyrim