Jump to content

OnTrackedStatsEvent not working (for me?)


YooReFa

Recommended Posts

Hey guys,

 

to attain a quest stage in the specific way I was looking for, I was happy to find this form (from the creationkit wiki):

Function SomeFunction()
  RegisterForTrackedStatsEvent("Barters", 50) ; Before we can use OnTrackedStatsEvent we must register.
EndFunction
 
Event OnTrackedStatsEvent(string asStatFilter, int aiStatValue)
    if (asStatFilter == "Barters")
	Debug.Trace("Player has bartered 50 or more times.")
    endif
endEvent

I was only going to test it first, but since "Barters" doesn't seem to be a TrackedStat in Fallout4, I changed it to "Locks Picked" for the time being. Also, I changed the "Debug.Trace" -line into "X.SetStage(x)". It didn't work. Debug.Notification didn't either. Nothing works at all.

 

So... what am I doing wrong? :confused:

Link to comment
Share on other sites

  On 11/27/2016 at 12:09 PM, shavkacagarikia said:

Are you calling SomeFunction() from somewhere? It wont be called automatically use Events instead

 

Geez, thank you so much.

 

Of course I didn't call the function at any point. Was kinda expecting the snippet to work... well, on a tracked stat event and got so fixated on the idea, I changed about anything but that. Again, thanks a bunch!

 

Edit: Another thing: The "List Of Tracked Stats" also has things like "People", "Happiness", "Food", etc. which got me interested. Since this would be for individual settlements, how would I approach this?

Edited by YooReFa
Link to comment
Share on other sites

  • Recently Browsing   0 members

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