No announcement yet.

Game settings menu

  • Filter
  • Time
  • Show
Clear All
new posts

    Game settings menu

    Guys, I'm working currently on main menu, and on the Settings page, I'm planing to include the following:

    Full screen

    etc etc

    I have following questions regarding those:
    1. where to get actual access to those settings in UDK, that is which file stores them
    2. what is the best practice to write-read from those files? Do it via uscript or via flash?

    Thank you.

    some variables in UDK are public, meaning you can access them at any time. these include resolution and so on. They are stored in the .ini configuration files. You can simply access them via console or by setting the ini upon "Confirm".

    The best practice is to do it from unrealscript. Flash should simply display your animations and graphics. You should try not to let it to anything else. Not because it cannot but because it is best practice not to.


      Hi, thank you for your reply.
      Sorry for noob question, but could you please give me example, how I'd go about setting/getting resolution from .ini file?

      Thank you.


        Bear in mind im a bit rusty with UDK here is what I remember.

        You have your ini variables stored in a property of your game class.

        Lets say we have a game called "DonkeyKing" with a game class of "ClimbToTheTop".

        You can access the ini variables (or the variables exposed to the public in the ini file) via the class property "default".

        So you would set the ini variables something like this ::

        class'DonkeyKing.ClimbToTheTop'.default.resX = 1280;
        class'DonkeyKing.ClimbToTheTop'.default.resY = 720;

        Now bear in mind your ini file might different in setup so change it appropriately. You of course set this in your unrealscript class file.


          Have a look at
          It shows all of the performance settings as well as the commands for setting and getting their values

          For adjusting volumes, the following function in PlayerController is used to set volumes:
          /** Sets the Audio Group to this the value passed in **/
          exec native function SetAudioGroupVolume( name GroupName, float Volume );
          The Audio Group names can be found in SoundClassesAndModes.upk
          Volumes aren't saved, which means you'll need to re-set the values at game startup. Audio Groups are a hierarchy, therefore if you modify the volume of a Audio Group, its children will be affected by the volume change.

          Example Usage:
          exec function GetCurrentVolume() {
          	local SoundClass SC;
          	SC = SoundClass'SoundClassesAndModes.Character';
          	`Log(SC.Properties.Volume); // Get current volume for this group
          exec function SetVolumeAG(float newVol) {
          	SetAudioGroupVolume('Character', newVol); //Prefered method for setting volume
          exec function SetVolume(float newVol) {
          	local SoundClass SC;
          	SC = SoundClass'SoundClassesAndModes.Character';
          	SC.Properties.Volume = newVol; // Alternative method