LadyOfFrost Posted February 15, 2024 Share Posted February 15, 2024 New to modding (and specifically scripting!) and I'm currently trying to make a follower mod. I'd like to have approval/disapproval points using global variables, but I don't know how to add and subtract the value only how to set it to a specific value. What I'd like is 0-100 value and then certain choices would add or subtract points to the value. So for example if my GlobalVariable ID is Follower_Approval and I want it to add 5 to the already existing value, how would I go about this? Or is there another way to make an approval system work in an easier way? Link to comment Share on other sites More sharing options...
scorrp10 Posted February 15, 2024 Share Posted February 15, 2024 For Global, if in a script you have GlobalVariable Property Follower_Approval Auto Float Points = 5.0 and it is filled with proper FormID in the script properties One option is: Follower_Approval.SetValue(Follower_Approval.GetValue() + Points) Not sure if this function is SKSE - and how old - but you can also: Follower_Approval.Mod(Points) I have seen a number of ways of handling such things. Set up a faction, add player to it, and value is player's rank in that faction. Set up a chest in some inaccessible location, and add stuff to it. Item counts represent values. 1 Link to comment Share on other sites More sharing options...
LadyOfFrost Posted February 15, 2024 Author Share Posted February 15, 2024 Thank you very much Scorrp10 for the help! Link to comment Share on other sites More sharing options...
Recommended Posts