nhackett Posted November 10, 2014 Share Posted November 10, 2014 I'm completely stumped. I'm attempting to create a quest that involves tracking the total lifetime bounty of the player from all factions. To do so I want to step through each element of the formlist 'crimeFactionList'. I'd greatly appreciate anyone that is able to explain what needs to fill the '???'. ... Event OnInit() RegisterForSingleUpdate(60.0) EndEvent Event OnUpdate() int crimeGold = 0 Int iElement = crimeFactionList.GetSize() Int iIndex = 0 ??? crimeFactionList = ??? ; should this be set as a script proprty? How do I declare a form list property? While iIndex < iElement ??? = crimeFactionList.GetAt(iIndex) ; What type of variable can hold this value? crimeGold = ???.GetInfamy() + crimeGold ; This ??? should be the variable from the previous line iIndex += 1 EndWhile debug.MessageBox("Total Player Infamy: " + crimegold) RegisterForSingleUpdate(updateInterval) EndEvent ... Link to comment Share on other sites More sharing options...
lofgren Posted November 10, 2014 Share Posted November 10, 2014 (edited) You create a formlist property like any other property: FormList property MyList auto To get the length of your formlist, use MyList.GetSize() GetAt will return a form, but you probably want a faction variable. So you should make a faction variable (MyFaction) and say: MyFaction = MyList.GetAt(iIndex) as faction However, you can get the PC's total lifetime bounty using the function: Game.QueryStat("Total Lifetime Bounty") Edited November 10, 2014 by lofgren Link to comment Share on other sites More sharing options...
nhackett Posted November 10, 2014 Author Share Posted November 10, 2014 so simple. I'll give it a try. Thanks. Link to comment Share on other sites More sharing options...
nhackett Posted November 10, 2014 Author Share Posted November 10, 2014 (edited) Game.QueryStat("Total Lifetime Bounty") ... Works exactly as intended. Thank you. Edited November 10, 2014 by nhackett Link to comment Share on other sites More sharing options...
Recommended Posts