Jump to content

Multiplication in GetActorValue?


Recommended Posts

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 by Rizalgar
Link to comment
Share on other sites

two things about modactorvalue2

A: 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 blade

set bla to bla * 2

 

or using OBSE you could go with

let bla := player.getactorvalue blade

let bla *= 2

 

 

 

arghhh haven't coded in a while

already feeling the rust setting in

try it and see what happens

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...