SKKmods Posted February 13, 2019 Share Posted February 13, 2019 (edited) I am doing unusual acts to WorkshopNPC actors, setting them to Essential + Bleedout so they take damage and need to use Stimpaks for recovery. On some random occasions when they recover by switching them SetNoBleedOutRecovery(False) wait 15 seconds to recover then back to SetNoBleedOutRecovery(True), they turn hostile to the player and start combat. (ThisActor.IsHostileToActor(pPlayerREF as Actor)) returns TRUE But iterating through all 698 available factions the settler could be a member of, not one of the factions is hostile to the player. If not a faction, what could be causing the hostility that I can disable or switch back to chummy ? EDIT its not a holdover from a friendly fire tap as IgnoreFriendlyHits(True) Edited February 13, 2019 by SKK50 Link to comment Share on other sites More sharing options...
SKKmods Posted February 13, 2019 Author Share Posted February 13, 2019 As soon as the hostile actor's 3D unloads, they stop being hostile to the player. There are no OnUnload() scripts attached to them. Link to comment Share on other sites More sharing options...
DieFeM Posted February 14, 2019 Share Posted February 14, 2019 (edited) I had to deal with this same problem, forcing the actor to be an ally to the player and viceversa did the trick. Game.GetPlayer().SetRelationshipRank(theActor, 3) theActor.SetRelationshipRank(Game.GetPlayer(), 3)SetRelationshipRank_-_Actor I hope it helps. Edit: You may need to run StopCombat() and StopCombatAlarm() before SetRelationshipRank to make it work properly. Edited February 14, 2019 by DieFeM Link to comment Share on other sites More sharing options...
SKKmods Posted February 14, 2019 Author Share Posted February 14, 2019 Appreciated, unfortunately they didn't work. Reviewing my last "ooohh that's an excellent idea I'll just make a quick change and publish it" did find the idiot logic error causing random hostility. Top Tip: if your going to self manage bleedout recovery, you have to wait for bleedout recovery to finish which is purely time based 15 to 20 seconds from SetNoBleedOutRecovery(False) and cant be measured using Health GetValue == GetBaseValue which is a leading indicator. Link to comment Share on other sites More sharing options...
DieFeM Posted February 14, 2019 Share Posted February 14, 2019 Actually, in my mod, the reason that caused the actor to be hostile was not the same, it was happening after using SetScale on the actors, that for some reason made them hostile, I guess because they took damage somehow by changing the scale... I don't know why actually.Btw, thanks for the tip. Link to comment Share on other sites More sharing options...
Recommended Posts