Jump to content

Get player's difficulty level from script


layam

Recommended Posts

In the CK, does anyone know of a way to get the currently selected difficulty level of the player from within a script. I've tried looking for a likely looking global variable, and there don't seem to be any functions to return that. Anyone tried this before? Edited by layam
Link to comment
Share on other sites

's probably sDifficulty from gamesettings (not tested)

http://www.creationkit.com/Settings

 

You should be able to read it with one of

float Function GetGameSettingFloat(string asGameSetting)

 

  • Obtains the value of a float game setting.

float Function GetGameSettingInt(string asGameSetting)

 

  • Obtains the value of an int game setting.

float Function GetGameSettingString(string asGameSetting)

 

  • Obtains the value of a string game setting.

(I'm guessing it's a float - everything's a bloody float)

Link to comment
Share on other sites

This one really made me lol. I've tested it out and Game.GetGameSettingString("sDifficulty") (it's a string setting) always returns difficulty as a string. That is, it always returns the string "Difficulty". Thanks for the post though, it was a good try.
Link to comment
Share on other sites

I've got a feeling that the game engine can't change game settings at runtime. There are a whole load of settings there to control the weight of each difficulty level, but I'm guessing actually choosing and applying the difficulty is buried somewhere in native code.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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