1) I have created a perk which adds a new Activate option when cross is over an Undead (and I was wrong...Reanimate creatures count as Undead...IsUndead == 1!) [Works]
2) I have added a magic effect to the "test" spell (Raise Zombie), which has the same duration of the reanimation and should move the reanimate creatures to the UndeadMinion faction.
[Doesn't work...see below!]
3) I have made a message which has option-activated buttons, one of which is for non-members of UndeadMinion faction, while the rest are for members of that faction. [Doesn't work!!]
Now...the script of the point "2" is like this:
"Scriptname VAoNMysticalSlavery extends ActiveMagicEffect
{This script cause a creature to become an undead minion of the caster (if player) and to assume a more aggressive and protective approach than in life.}
import Actor
import ObjectReference
Faction Property faMinionState Auto
{This is the faction that corresponds to the condition of being a minion of the player.}
Event OnEffectStart(Actor akTarget, Actor akCaster)
if Game.Getplayer() == akCaster
akTarget.AddToFaction(faMinionState)
endif
akTarget.SetActorValue("aggression", 1)
akTarget.SetActorValue("confidence", 0)
akTarget.SetActorValue("morality", 0)
akTarget.SetActorValue("assistance", 1)
EndEvent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
if Game.Getplayer() == akCaster
akTarget.RemoveFromFaction(faMinionState)
endif
akTarget.SetActorValue("aggression", 0)
akTarget.SetActorValue("confidence", 4)
akTarget.SetActorValue("morality", 3)
akTarget.SetActorValue("assistance", 0)
endEvent"
The problem is that the "Game.Getplayer() == akCaster" seems to be false (even if my character casted the spell!!), since the new faction isn't Added!
Moreover...I've tried to use the conditions to keep two distinct sets of buttons (for minions and for non-minions), but the message doesn't seem to take the condition!!
I mean...at first I tried the "Target" as reference for the condition...it shows no buttons (apart from an "OK")!
I mean...at first I tried the "Subject" as reference for the condition...it shows only the button for not being member, but, since it doesn't change even if I move the character to the faction with command console (which checked gives 1...so the creature has moved to the faction), it seems not to check on the target for those keywords!!
Please...please...please...
...anyone has a suggestion on how to manage this?
Kind Regards,
Jashak
