maxarturo Posted June 28, 2019 Share Posted June 28, 2019 I have three simple power up station that is supposed to add 10 point of permanent Health or Stamina or Magicka, but i'm confused between the "ModActorValue" and "SetActorValue" and although i had read a bounch of stuff online, it only resulted in more confusion... My issue is that when i change this line:ActorRef.SetActorValue(sWorkingAV, ActorRef.GetBaseActorValue(sWorkingAV) + fActorValueBoost)Health - Stamina - Magicka will go from 100 to 110. TO ActorRef.ModAV(sWorkingAV, ActorRef.GetBaseActorValue(sWorkingAV) + fActorValueBoost)Health - Stamina - Magicka will go from 100 to 210. * The set value for a both is 10. So what's the difference, and what should i actually use ?.Plus i read in a lot of post that you should never use "ModActorValue", is that true and why ?. Many thanks in advanced ! Link to comment Share on other sites More sharing options...
DanteRedfield Posted June 28, 2019 Share Posted June 28, 2019 I don't know if setav and modav work differently but you should never use forceav because you can't stack more buffs on it Link to comment Share on other sites More sharing options...
maxarturo Posted June 28, 2019 Author Share Posted June 28, 2019 I don't know if setav and modav work differently but you should never use forceav because you can't stack more buffs on itI know about "ForceAV"... my issue is with setav and modav. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 28, 2019 Share Posted June 28, 2019 (edited) ModAV modifies by that amount where SetAV sets it to that amount. In your examples you would use the following to get 110: ActorRef.SetActorValue(sWorkingAV, ActorRef.GetBaseActorValue(sWorkingAV) + fActorValueBoost) ActorRef.ModAV(sWorkingAV, fActorValueBoost) Set requires taking the base and adding what you want. While Mod just adds what you want. Mod is probably best in the long run. EDIT: typo fix Edited June 28, 2019 by IsharaMeradin Link to comment Share on other sites More sharing options...
maxarturo Posted June 28, 2019 Author Share Posted June 28, 2019 (edited) ModAV modifies by that amount where SetAV sets it to that amount. In your examples you would use the following to get 110: ActorRef.SetActorValue(sWorkingAV, ActorRef.GetBaseActorValue(sWorkingAV) + fActorValueBoost) ActorRef.ModAV(sWorkingAV, fActorValueBoost) Set requires taking the base and adding what you want. While Mod just adds what you want. Mod is probably best in the long run. EDIT: typo fixSo more or less, is actually the same...Your advice is to use "ModAV" intead of "SetActorValue" ?. * I saw the mistake after i ate (sWorkingAV, fActorValueBoost). Thanks for replying !. Edited June 28, 2019 by maxarturo Link to comment Share on other sites More sharing options...
Evangela Posted July 1, 2019 Share Posted July 1, 2019 ModValue is also thread safe. SetActorValue changes the base value, so keep that in mind. Link to comment Share on other sites More sharing options...
maxarturo Posted July 1, 2019 Author Share Posted July 1, 2019 ModValue is also thread safe. SetActorValue changes the base value, so keep that in mind.I read this also in another post "ModValue is also thread safe", so i end up using "ModAV". What i don't understand is why i keep finding post suggesting that you should never use "ModActorValue" in your script, none of those post justify the reason behind it, they just warn you. Thanks for your reply !. Link to comment Share on other sites More sharing options...
Recommended Posts