Jump to content

Can I make a script which tweak setting value?


IldunFong

Recommended Posts

Something like this?

scn PerkReduceLockDifficultyScript

BEGIN GameMode
if player.hasperk PerkReduceLockDifficulty == 1
 set iLockLevelMaxVeryEasy to 0
 set iLockLevelMaxEasy to 0
 set iLockLevelMaxAverage to 25
 set iLockLevelMaxHard to 50
 set iLockLevelMaxVeryHard to 75
elseif player.hasperk PerkReduceLockDifficulty == 0
 set iLockLevelMaxVeryEasy to 0
 set iLockLevelMaxEasy to 25
 set iLockLevelMaxAverage to 50
 set iLockLevelMaxHard to 75
 set iLockLevelMaxVeryHard to 100
endif
END 
Link to comment
Share on other sites

Assuming the variables already exists, yes. But I did not find any "globals" with the keyword "lock" in them, so you would need to define them first, before there is any chance your scripts using them can run. See "TIP Best Practice Sharing Variables between Scripts" in the "Scripting" section of the wiki "Getting started creating mods using GECK" article.

 

You should also include a "DoOnce" type of "flag variable" so you aren't resetting those variables every frame. For an example of what I mean, see "TIP Assigning and Testing variables" in that same section.

 

-Dubious-

Link to comment
Share on other sites

Assuming the variables already exists, yes. But I did not find any "globals" with the keyword "lock" in them, so you would need to define them first, before there is any chance your scripts using them can run. See "TIP Best Practice Sharing Variables between Scripts" in the "Scripting" section of the wiki "Getting started creating mods using GECK" article.

 

You should also include a "DoOnce" type of "flag variable" so you aren't resetting those variables every frame. For an example of what I mean, see "TIP Assigning and Testing variables" in that same section.

 

-Dubious-

Thanks, after I made some changes such as

set iLockLevelMaxVeryHard to 75

to

setnumericgamesetting iLockLevelMaxVeryHard to 75 

it work, though the force lock % text remain same

Link to comment
Share on other sites

  • Recently Browsing   0 members

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