I am creating a web game which uses arrows to control the car, but in mobile/tablet I’m providing sprite controls. I don’t want the sprites to appear on desktop. Is there any way to leverage css to hide them with media queries?
Or just a way to hide them from desktop users within construct?
Thanks in advance
Develop games in your browser. Powerful, performant & highly capable.
You can use the Browser plugin, it has a platform expression: construct.net/en/make-games/manuals/construct-3/plugin-reference/browser
Add the PlatformInfo object. Then use the Is on mobile condition.
IMO, the easiest way is to read the following tutorial...
Touch controls & detecting input method
If it's TL;DR, then just skip down to the section called DETECTING INPUT METHOD.
It has the info you want on hiding onscreen controls if the user is on desktop.
That worked perfectly thank you.
I just have a button on the title screen, and if the user clicks the mouse, I know they are on a PC, and if they tap, then I know they are on a mobile device, and can show the controls based on this.
Thank you again