Jump to content

problem with perk script


spammster

Recommended Posts

I am working on a Perk, that changes the players SPECIAL stats (was thinking of doing a Supermutant perk, that turns you into a supermutant, making you a supermutant isn't all that big a problem, its just a change in factions and after that its only textures)

 

but my problem is this:

 

the Perk is supposed to be something like this:

 

You have been abducted by Supermutants and they turned you into one of them !!

Strength +2

Intelligence -3

Rad Res. 100%

 

the change in rad resistance wasn't a problem (borrowed me some ghoul scripting for that)

 

but the strength and intelligence change does nothing, here is the script i'm using (it does compile without error)

 

Short STRE

Set STRE to (2 + player.GetAV Strength)

if STRE >= 8

player.modAV Strength 10

else player.ModAV Strength STRE

endif

 

Short INTEL

Set INTEL to (player.GetAV Intelligence - 3)

if INTEL <= 3

player.modAV Intelligence 1

else player.modAV Intelligence INTEL

endif

 

my question would be: WTF am i doing wrong ?

Link to comment
Share on other sites

From the look of that code, I'm guessing it's a result script? Only "ref" variables are legal in result scripts, although I don't think declaring other variables will cause compiler errors, so your "short" variables won't work properly in that context. If you need to use non-"ref" variables in a result script, I recommend declaring them in a "Variable Reservoir" quest script (i.e. a quest script consisting entirely of variable declarations) and accessing them via this syntax:

QuestEditorID.VariableName

Cipscis

Link to comment
Share on other sites

  • Recently Browsing   0 members

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