szaumoor Posted August 18, 2022 Share Posted August 18, 2022 (edited) It's the first time I write a script. This script is inside a Magic Effect, which then is cast by a Spell. I tried to make it so wolves become allies towards the player. But this does not work, at all. I can't find any solutions to this. I just followed the CreationKit website mini tutorial, but it didn't work, what gives? thanks Essentially the spell makes nearby wolves friendly and helpful in combat by using the CommandAnimal script that Bosmer have. I added another effect to hopefully make it so the rest of wolves are friendly towards the player but it doesn't work. I filled the properties and checked that the player does indeed become part of the wolf faction. But any wolves I spawn are hostile. Faction Property WolfFaction Auto Faction Property PlayerFaction Auto Actor Property PlayerRef Auto int OriginalReaction Event OnEffectStart(Actor akTarget, Actor akCaster) OriginalReaction = PlayerFaction.GetReaction(WolfFaction) PlayerRef.AddToFaction(WolfFaction) PlayerFaction.SetReaction(WolfFaction, 3) EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) PlayerFaction.SetReaction(WolfFaction, OriginalReaction) PlayerRef.RemoveFromFaction(WolfFaction) EndEvent Edited August 18, 2022 by szaumoor Link to comment Share on other sites More sharing options...
Sphered Posted August 18, 2022 Share Posted August 18, 2022 I would go with SetRank() Setting rank will add to the faction automatically if they are not already in it As for hostilities, theres a faction called DunPrisoner, that if you add player to it, most enemies are not hostile. I might suggest creating a faction doing something similar but apply it only to the enemies you want to be not hostile. Just another route to consider. I have never encountered a need to modify reactions via script Link to comment Share on other sites More sharing options...
szaumoor Posted August 19, 2022 Author Share Posted August 19, 2022 I was able to make it work by creating a faction and adding each wolf npc in there. It works although I don't like that I had to modify those NPC records. Not sure if there is a better way. Link to comment Share on other sites More sharing options...
Recommended Posts