Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Behaviors triggered by events

directxy
Registered User
Quote
2024-02-11 18:42:20

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?


vp
Guest
Quote
2024-02-12 08:27:11

When "a" key is pressed: switch scene (menu)
When "a" key is released: switch scene (game)


vp
Guest
Quote
2024-02-12 08:30:57

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


writer
Guest
Quote
2024-02-12 09:05:40

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 .


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact