x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Creating an Options menu via Blueprint / Allowing user to change Resolution

Sorry if this sounds like a dumb question, I'm new to this and I'm not really sure where to start when it comes to letting players choose their graphical options.

I have a main menu which is a separate level with custom game mode for mouse control, I have a New Game button which when clicked loads the player into a level and the game mode changes to whatever that level is set to, I have that working fine.

Within this I tried to create an options menu to allow the player to change resolution. I tried building my game and hunting down an ini file that affected it but couldn't.

I read another answer that suggested to call the scalability options using console commands, and this seems to work okay.

However, for changing resolutions calling r.setRes from a blueprint seems to crash the editor, and the built game. Opening the console and typing it in seems to work, so I'm not sure what's causing the crash. The other scalability commands seem to work okay, though. The output log spits this out: http://pastebin.com/ajAwzyLj

Is r.SetRes the wrong way to go about doing this? How else can I give the user the option of changing the resolution?

edit: I'm also having trouble figuring out how to do a fullscreen toggle. r.FullScreenMode mentions a [SystemSettings] ini with a fullscreen bool but I'm not sure how I would find or create one for my game, and interact with it via blueprints. r.SetRes mentions a w or f modifier on the resolution, but using it at all via blueprints just crashes the game and editor as mentioned.

edit 2: Okay I just tried creating a new blank project and using r.setres, and it works fine when called from the level blueprint! I have no idea why my project is crashing, but it's related to using r.setres. I'm going to try importing my old blueprint to this new project, Edit 3: Old blueprint crashes new project. Maybe because it's being called from the HUD blueprint? Do I need to make a ChangeRes function somewhere else and then call it when a user clicks on the HUD element? Using a new HUD blueprint and calling it after a hit box is clicked on seems to crash it too.

Product Version: Not Selected
Tags:
more ▼

asked Apr 06 '14 at 01:28 PM in Blueprint Scripting

avatar image

amiserablerobot
107 2 5 8

avatar image sinoth Apr 06 '14 at 03:08 PM

Upvoting for visibility because I've been wondering this exact thing -- how to save settings (quality, resolution) that persist through closing and relaunching the game.

avatar image amiserablerobot Apr 06 '14 at 05:04 PM

I think by storing all the settings in an array and creating a save game object and saving them to a "Settings" slot may work (Tappy Chickens high score seems persistent, anyway), then loading it at event begin to restore the settings / running through the console commands for each item in the array.

It definitely does not seem like the right way to do it, but I can't find anything in the documentation regarding interacting with the .ini files, or creating them, or even where save game files are created. It won't help the issue with r.SetRes being incredibly crash happy, either.

Edit: Using a SaveGame object I figured out how to save settings and stuff, I'm making a rough/informal video for how to make a basic menu at the moment. SetRes still crashes though. Curiously whilst casting to the save game object I noticed something interesting where I could cast to engine settings and such, but I don't seem to be able to recreate it.

The save stuff I took straight from TappyChicken. It seems persistent.

avatar image sinoth Apr 06 '14 at 10:41 PM

Thanks for the pointer about Tappy Chicken and the save game slot. I'll experiment with that, though I agree that it doesn't sound like the right way to do it. My problem with save game vs ini file is that the ini file will apply quality settings before anything else happens. Seems like applying settings via save slot would effectively be more costly because it first loads everything high quality.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question