How to hide a mini map with input.is_action_pressed

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Alexm

Well i made a mini map using viewport and i tried to control the visibility so i created an action and the key is the basic key used usually “m” but when i tried it like this :
if input.is_action_pressed(“minimap”) :
show ()
else :
hide()
it doesn’t work i even tried to make an action to hide it (“minioff”) with n key but didnt work
Where is the problem maybe there’s something that i dont know
Thanx for helping

In which node is this code? In the code of the minimap?

SteveSmith | 2022-10-02 17:56