Rizalgar Posted December 22, 2018 Share Posted December 22, 2018 (edited) Ok so I'm trying to make a script that, when you use a spell, you get a buff to skills based on a simple mathematical equation. Problem is, I can't seem to get it to work.In the script I have this float bla begin scripteffectstart set bla to player.getactorvalue blade *2.0 end begin scripteffectupdate player.modav2 blade bla end Which doesn't work. Come to think of it, me trying to mod attribute and skill values through spell script doesn't work at all. I can get it to work just fine if I have the spell cast a buff on the player that modifies the AV/SV by a set number. But I'm trying to get it to modify it by a float value ( Note that script was for testing purposes and not the actual values I intend to use >_> ) So is there any way to do this? Maybe by setting the change to a global value? I'm not sure on this one, I'm a bit stumped. ---Edit SetAV works just fine for set numbers, ModAV2 doesn't work, however. Strange. I'll try using ModAV real quick. ModAV works just fine as well. Just ModAV2 doesn't work. Wonder why that is. Guess I'll have to be sure to make sure to change any stats back at the end of the script. Edited December 22, 2018 by Rizalgar Link to comment Share on other sites More sharing options...
Moktah Posted December 23, 2018 Share Posted December 23, 2018 two things about modactorvalue2A: its an OBSE command (got everything set up and ready for obse?)B: it can restore a stat but not add values above that stat's max Break your math down into two steps set bla to player.getactorvalue bladeset bla to bla * 2 or using OBSE you could go withlet bla := player.getactorvalue bladelet bla *= 2 arghhh haven't coded in a whilealready feeling the rust setting intry it and see what happens Link to comment Share on other sites More sharing options...
Rizalgar Posted December 23, 2018 Author Share Posted December 23, 2018 I will definitely give that a shot, thank you, good sir Link to comment Share on other sites More sharing options...
Recommended Posts