Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Behaviors triggered by events-> When a key is pressed do something-> <Hide or unhide a scene node-> [ … ] I want a Menu appear when I hold a key down, at the same time this shown menu needs to be selectable with mouse to perform an action. When I release the key the menu needs to dissappear. Sofar I can only toggle visibility. Can someone please help? |
||||
|
When "a" key is pressed: switch scene (menu) When "a" key is released: switch scene (game) |
||||
|
...or, if you don't want to switch scenes for a menu, you can show/hide a 2D overlay for the mouse to interact with instead. I have a few non-code menu examples on my itch.io page. |
||||
|
Yes, you can do this and execute the code for displaying the cursor and switching visibility as you described JS CODE: ccbSetCursorVisible(false); and change true . |
|