Could use some help with a handful of problems

I’ve been trying to get my game to a polished state to start showing off, but the more I work the more I keep hitting little oddities that I can’t seem to work around. Since I’m working in blueprint and I kind of have several different problems, I figured this would be the best place to ask.

(EDIT: It seems that Rama’s Victory plugin has some helper functions that allow you to write out variables to the Game.ini)

  1. Setting up .ini game settings (e.g. VSync, Full screen, screen resolution)

I’ve figured out a work around, basically parsing variables and generating console commands, but it seems just awful that the .ini file has settings that are read when the game is launched, then the game reads my saved data, and executes upon that. It seems like a really crucial oversight that you can’t read/write to the basic options file of your game, and instead have to use a work around that essentially is reading the .ini, launching the game with those settings, then reading my custom options, then adjusting again. Did I miss something crucial here? Not only does my method seems slow, it also conflicts with the .ini and can’t be manually changed by the player, but it seems to be the only way through blueprint.

  1. Basic sequences of events

I only really started seeing this recently, but it seems like blueprints don’t consistently execute in order. The ‘sequence’ node is a big pain for me, because it doesn’t actually do things sequentially. It’s pins fire off sequentially, but it doesn’t wait for one pin to complete it’s chain before the next, meaning if one pin takes even a little bit of time to execute, you need to manually force delays to ensure they execute in the correct order. This becomes even worse when you’re trying to time things together. For example, I have a ‘fade to black’ widget that I use to try and cover level loads, player resets, and other jarring transitions. The problem is that the ‘fade’ effect takes 1 second, but I usually have to delay for a solid 1.5 - 2 seconds before removing it or passing another fade (from black to transparent), otherwise the widget never finishes it’s transition or conflicts with the current effect.

That’s bad, but even worse, it seems that the game doesn’t wait for ‘begin play’ commands to execute before displaying the world, so when trying to fading from black to transparent upon a level load, 90% of the time you will see like 3-4 frames of fully visible level before it cuts to black and fades properly. It also seems to display the level before it’s properly loaded, with textures popping in and sometimes it seems even before it’s loaded lightmaps (popping the lighting needs to be rebuilt error onto the screen for a few frames).

I’m not sure if there’s a more reliable way to ensure everything happens in the right order, but it just seems that the engine doesn’t really care about when blueprint commands are supposed to fire, it’ll just get to them when it can.

  1. Hiding the mouse cursor doesn’t work without player input

This one isn’t that big of a problem, but it really makes the game feel a little unprofessional. Upon loading into the game, you hit a main menu, and the pawn runs the ‘show mouse cursor’ on the controller, showing the cursor and allowing you to use the menus. Everything good so far. However, upon clicking new game, it runs same thing except set to false and nothing happens; the cursor stays. Then after playing an animation, it loads the first level, a scene with a custom first person character with mouse look. I have tried setting it to run the same command as earlier on play, but still the cursor is there, and as long as the cursor is visible, mouse look doesn’t work. When you click, it refocuses on the viewport and suddenly the cursor goes away and mouse look starts working again. So it’s not exactly game breaking, but it seems really odd that you can show the cursor through commands, but there’s no way to hide it without additional input from the player. I did find this (Answerhub) but all the answers were basically recommending I do what I’ve already done or start using C++.

While this isn’t catastrophic for me, I could understand any game that has in game menus to find this kind of nightmarish. It’s also kind of making me reluctant to implement an in game pause menu, since it’s just going to cause this over and over.

Anyway, sorry for the long post. I would appreciate any solutions or work-around to anything here. I’m kind of frying my brain over this and beating my head against the wall.

I have an idea for #2: You could Branch > Delay > Repeat a variable check to see if the previous Sequence is finished, setting a variable at the very end of the nodes for the previous Sequence line. In other words, as the last node on Sequence 1, set a “SequenceFinished” boolean to true. Right at the beginning of Sequence 2, check if SequenceFinished is true, if not, delay 0.1 seconds and loop back into the branch. If true, set SequenceFinished to false and continue on, setting SequenceFinished to true at the end of that line of nodes. Repeat ad-nauseaum.

For #1 you know, it’s not uncommon for games to have a launcher and allow people to set settings before launching the game. You could write to the ini then.

For #3 I can’t say I’ve experienced that, I’ve had decent luck with mouse/control but without seeing any blueprints we really can’t comment much. Same for #2.

Thanks for the suggestion. Unfortunately, unless you’ve got some resources to point me towards, that’s beyond me. I did find a launcher provided by someone here, but that seemed more about patching from a online server than editing/setting config files. My programming experience is limited, especially when it comes to C++. That’s also another layer of complexity that I’m hoping to avoid. Doing some more searching, it seems like the only way to get the functionality I want is to built some C++ helper functions that I can expose to blueprint. Programming in Unreal always makes me feel like I’m going to break something.

Rama has some stuff in his thread that could quite possibly help you with that writing issue.

(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required! - Blueprint Visual Scripting - Unreal Engine Forums!

I’m pretty sure that’s the one, sorry… the forums literally just choked hard on my laptop here at work and are all messy now.

Well, that does actually have the function I need, and would you believe that I already had that plugin installed? Thanks, I used it earlier for a master volume set up and I guess I didn’t look too closely at the other features. That’s one thing off the list. :slight_smile:

RE: #2
If you are having issues with sequence, and you are working on an event graph, you could always try triggering an event at the end of your line of node calls.
Another option would be to separate the sets of node calls into functions, and then call them one after the other.

Also, If you set up fading out in a timeline, you could trigger the load and delay for fade in when the ‘finished’ pin fires.

I hope this helps, good luck with your project!

-Spiris