I’m currently trying to make an options menu for my game. There needs to be a toggle so that the user can invert the Mouse Y while they are playing. I have a variable called ReverseLookUp that controls this and is stored inside of the myCharacter class. However, I have a blueprint widget for the options on the menu with a checkbox, that, when flipped, inverts the value of ReverseLookUp. They are in different blueprints, so I need them to communicate. I’ve already tried using Blueprint Interfaces but I continue getting errors and they aren’t sharing the value. Any help is much appreciated. Thanks!
First off, thank you for your response! It seems like a step in their right direction. I compiled and saved it with no problems, but it doesn’t actually invert the mouse. I’m attaching some pictures because I can’t figure out why it doesn’t work. I’m guessing that in the game, I need to update it again.
Again, thank you for your help!
Try with “Get player pawn” and the cast on your character. Like this:
I copied your script and tested it and it works fine.
First off, thank you for your patience! I’m pretty new to this, so your help is much appreciated. This time I’m going to attach some more pictures so that you understand what exactly is going on. My first comment is that I’m not seeing the difference from what you showed me the first time and the second. I see that the branch is before the cast, which I tried to no success. Also, the Yaw isn’t what I wanted to invert, but the Pitch (Up and down). In my game, the checkbox is inside of a Widget Blueprint called options. (See the first Picture) There is also a back button in options, which takes me back to the “menu” level. In the menu, there is a “Play” button and the “Options” button. Once, I click “Play” it launched the “Main” level.
Next, I did some breakpoint work to see what is going on, and what happens is that in the widget blueprint “optionsStuff”, it recognizes that the box is true, but it fails casting to MyCharacter. (I checked by adding a print string for cast failed) I’m assuming this is the issue. Any idea why?
Finally, if this doesn’t solve the problem, I’m wondering if when I switch from level to level, the mouse thing resets. Before this, I noticed that when breakpoints were added, the reverseLookUp variable wasn’t actually being changed. Any clues as to why? Thanks again!
If you watch the screenshoot you will notice that i used “get player pawn” instead of “get player character” and then i used the cast.
And yes, when you load a new level all the vars will be resetted. So you should use a savegame file
Could i ask you to add my on skype?
SKYPE ID: davide.fanto