Jump to content

Need help with faction/scripting mod


pneumonia

Recommended Posts

posting this for a friend who doesn't have an account here -

 

I want to make a script that extends Faction, in order to decrease bounty in each crime faction every 24 hours. I figured I could do this by simply adding this script to each faction, but it seems I'm only able to add scripts to ObjectReferences in the world, and not to a Faction. Is there a way to do this or does anyone have advice for a better approach?

 

this is what we have so far:

Scriptname factionbountydecay extends Faction

Int Property decayPerDay Auto

Event OnInit()
RegisterForUpdateGameTime(24)
GotoState("Active")
EndEvent

State Active
Event OnUpdateGameTime()
	parent.ModCrimeGold(-decayPerDay)
EndEvent
EndState

Link to comment
Share on other sites

  • Recently Browsing   0 members

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