Help adding bounty to current hold

Post » Wed Mar 13, 2013 3:48 pm

As the title says I have a need to add a certain gold amount to the bounty for the hold the player is currently in. The only function I can find is to a getcrimefaction on actors. But that's where I am stuck. Using a FindClosestActorFromRef or FindClosestActor Game function almost always returns the player which doesn't really help. So I thought maybe finding the crime faction through the location, but I am again stuck. Any help would be appreciated.

This gets me close (where self is an activator):


Actor Nearby = Game.FindClosestActorFromRef(self, 5000)
Faction Crime = Nearby.getcrimefaction()


Crime.ModCrimeGold(Gold)


And I think this does too:

cell cObjCell = self.GetParentCell()
Faction fFaction
fFaction = cObjCell.GetFactionOwner()
fFaction.ModCrimeGold(Gold)


The first is a problem as the player is almost always returned.
The second is a problem because FactionOwner is not the same as CrimeFaction

Please help.

TIA - Dominoid
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Wed Mar 13, 2013 7:51 pm

I guess if someone could solve how to get the current hold name, I could write a 9-step If/ElseIf statement and add the bounty accordingly. But right now my brain is fried.

Dominoid
User avatar
Ownie Zuliana
 
Posts: 3375
Joined: Thu Jun 15, 2006 4:31 am


Return to V - Skyrim