Jump to content

Arena fighters keep fighting after setting them as allies. [wasteland workshop]


Recommended Posts

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 by PoliteRaider
Link to comment
Share on other sites

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()
EndEvent

In 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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...