KingShelby Posted July 8, 2014 Share Posted July 8, 2014 Anyone know a script method that will give a return value of of a game setting? I'm trying to get a return value. ( fBarterBuyBase ) , ( fBarterBuyMult ) -------------------------------- Im trying to get an object to revil what it would cost if you bought it from a vendor. So looking at it would show the actual cost you would incur. The barter system formula is :Buying price = (Item Value * fBarterBuyBase) + (Item Value * Skill * fBarterBuyMult / 100)----------------------------------------------- I can set varibles to get the item value with fose, and implement variables in place of the game settings so I'll be able to mimic the barter system formula. I just need to implement the actual values of the game settings for it to work, and these change as you play. Example of what I've come up with so far: Ref ThisItemInt ThisItemPickedInt MyValueInt CalculatingBarterValueInt BarterBuyBaseInt BSkillInt BuyMult if ThisItemPicked == 0 Set ThisItem to GetBaseObject Set ThisItemPicked to 2 endif if MyValue == 0 Set MyValue to Getvalue Set BarterBuyBase to player.GetBaseActorValue Barter Set BSkill to player.GetActorValue Barter ;???; Set BuyMult to endif if CalculatingBarterValue == 0; Buying price = (Item Value * fBarterBuyBase) + (Item Value * Skill * fBarterBuyMult / 100); Set MyValue to (MyValue * fBarterBuyBase) + (MyValue * Skill * fBarterBuyMult / 100) Set MyValue to (MyValue * BarterBuyBase) + (MyValue * BSkill * BuyMult / 100) Set CalculatingBarterValue to 1 endif ----------------------------- Link to comment Share on other sites More sharing options...
Belthan Posted July 8, 2014 Share Posted July 8, 2014 You can call GetGameSetting like so: FLOAT MyBase FLOAT MyMult set MyBase to GetGameSetting fBarterBuyBase set MyMult to GetGameSetting fBarterBuyMult Then use MyBase and MyMult in your calculations as you described. Link to comment Share on other sites More sharing options...
Recommended Posts