How to associate "m" key to blueprint minimap in level blueprint ?

How to associate “m” key to blueprint minimap in level blueprint ?

I already set up a minimap blueprint and tested as a HUD, and it´s works. But, i´m not want the minimap showing continuously in the viewport during gameplay. I want to call the minimap pressing “M” Key. And, if pressed again, do the inverse.

Any ideias? See the blueprint minimap in attachment.

Are you sure you want this from the levelblueprint?

I mean you could add a variable to your HUD blueprint and toggle that via the m key from your level blueprint with “Get player controller” → “Get HUD” and add a branch right in front of your “Draw Texture” node which checks this variable.

But this is a functionality which should not be restricted to your level. You probably want multiple maps.

Doing this from your Character would spare you a lot of trouble over time since it would work always and not only in your one level.

Inside of the levelblueprint you only really want level specific stuff like scripted events, special behavior or trigger boxes which do something special. Not your actual gameplay and controls.

You would actually want this on your character blueprint. As to how to implement it, you can get a key pressed event, drag off that to a flip/flop node, and off of that into a “Set Visibility Node” with one hidden and one visible, depending on your defaults.

You right, i´m don´t want to do this in level blueprint (my mistake) i only call this minimap pressing “M” key.

But, i´m lost here…as this would be the hud blueprint and the level blueprint ? Could you give me an example of this type of blueprint?

You probably want to do this in your controller BP.

Create a new boolean variable in your HUD. Then in your controller get the M key event, use “Get HUD”, from this node "Set " and then do whatever you want with it.

Just create a branch in your HUD directly in front of your Texture checking this boolean and you’re good.

Sorry, i can´t get it…i tried that , but is not work…i think i doing something wrong… :frowning:

Sorry, i can´t get it…i tried that , but is not work…i think i doing something wrong… :frowning:

I´m at work right now, but i try one more time and take a printscreen what i get so far…

This is my actual blueprint…i tried to use “M” using Get Actor Rotation x Get Rotation X Vector, but nothing happens…

Any sugestions? Please?

The minimap blueprint (my camera on top view) works fine if i turn “On” in the HUD of my HUD CLASS ( in world .settings). (But i only want to CALL the hud , if i need it, during gameplay)

Yeah… Not what I meant. See attached.(And ignore the comment text on the image… need to update that.

You could also swap out the set visibility nodes with create widget and remove from parent nodes if you wanted, but these work fine.

Ok, let me see if i understand…in this case, the target widget, in visibility node, is a widget ? Not actual blueprint actor?

I try it later because this took me a lot time …anyway, tks in advice! Happy 2015!