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 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.
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)