PoliteRaider Posted April 16, 2016 Share Posted April 16, 2016 (edited) So I've written a fairly simple papyrus script that allows you to toggle whether the arena factions are friends or enemies by ringing bells. (I've got no idea why Bethesda didn't do this). The scripts appear to be working just fine, however I've got a problem. Once the fighters start fighting, I can set their factions to friendly again but it doesn't interrupt the combat. They'll keep on fighting until they die or I unassign them from their arena task. I don't know how the AI works with fighting, is there some other setting I need to change to interrupt a fight that's currently in progress? Edit: In case it helps I've included my script (for the bell to end fights) below. const ScriptName ArenaFightDelay2 extends ObjectReference default ;-- Properties -------------------------------------- Faction Property CombatantFactionA Auto Faction Property CombatantFactionB Auto Faction Property TamedCreatureFaction Auto Function OnActivate(ObjectReference akActionRef) Self.GoPeaceful() EndFunction Function GoHostile() CombatantFactionA.SetEnemy(CombatantFactionB, False, False) CombatantFactionB.SetEnemy(CombatantFactionA, False, False) TamedCreatureFaction.SetEnemy(CombatantFactionB, False, False) TamedCreatureFaction.SetEnemy(CombatantFactionA, False, False) CombatantFactionA.SetEnemy(TamedCreatureFaction, False, False) CombatantFactionB.SetEnemy(TamedCreatureFaction, False, False) CombatantFactionA.SetAlly(CombatantFactionA, False, False) CombatantFactionB.SetAlly(CombatantFactionB, False, False) TamedCreatureFaction.SetEnemy(TamedCreatureFaction, False, False) debug.notification("Go Hostile") EndFunction Function GoPeaceful() CombatantFactionA.SetAlly(CombatantFactionB, True, True) CombatantFactionB.SetAlly(CombatantFactionA, True, True) TamedCreatureFaction.SetAlly(CombatantFactionB, True, True) TamedCreatureFaction.SetAlly(CombatantFactionA, True, True) CombatantFactionA.SetAlly(TamedCreatureFaction, True, True) CombatantFactionB.SetAlly(TamedCreatureFaction, True, True) CombatantFactionA.SetAlly(CombatantFactionA, True, True) CombatantFactionB.SetAlly(CombatantFactionB, True, True) TamedCreatureFaction.SetAlly(TamedCreatureFaction, True, True) debug.notification("Go Peaceful") EndFunction Edited April 16, 2016 by PoliteRaider Link to comment Share on other sites More sharing options...
PoliteRaider Posted April 16, 2016 Author Share Posted April 16, 2016 Okay, so I've figured out that I need to call the StopCombatAlarm() function on the NPCs, I just need to figure out how to do that from this script when it doesn't have a loaded list of the NPCs assigned to the arena. Link to comment Share on other sites More sharing options...
TheShatteredSteel Posted April 17, 2016 Share Posted April 17, 2016 You could have the bell cast a spell - give the spell's magic effect a fairly large area and add a script to the magic effect like the below (Skyrim example, should still work) Scriptname _StopCombatExample extends ActiveMagicEffect Event OnEffectApply(Actor akTarget, Actor akCaster) AkTarget.StopCombatAlarm() EndEventIn order to prevent it from messing with any passing raiders, turrets, etc. you can add some GetInFaction conditions to the magic effect. Link to comment Share on other sites More sharing options...
PoliteRaider Posted April 17, 2016 Author Share Posted April 17, 2016 Ah thankyou, that looks like a good approach. I think I can see how to get that working with my mod. Link to comment Share on other sites More sharing options...
PoliteRaider Posted April 23, 2016 Author Share Posted April 23, 2016 I'm having a bit of trouble finding the time to finish this one off. I just wanted to mention it in case anyone was either waiting for me to finish because they wanted this mod or were holding off from making one themselves. Not sure when I'll get it finished, this was more to solve my own intellectual curiosity than for any practical end. Just wanted to figure out how the wasteland workshop stuff worked. If anyone else is working on this or wants to finish it off, I'm happy to send you my files for your use if it will help. Just let me know. Link to comment Share on other sites More sharing options...
ThoraldGM Posted April 24, 2016 Share Posted April 24, 2016 Just a couple of thoughts, not at a computer to test. Have you looked at the pax syringe for the syringer? Also, there might be external scripts forcing aggression in your area that would have to be scrubbed, which is what I found in Easy City Downs. Link to comment Share on other sites More sharing options...
Recommended Posts