Interact with HTML pages?

Get help using Construct 2

Post » Mon Jul 22, 2013 11:31 am

Construct 2 is good at the core game canvas, but not so good at lobbies, login sessions, info screens, help screens etc.

What I am wondering is this:

1. Is it possible to "call" a URL/HTML Page from within the game, such that on that page, if they hit a "return to game" type HTML5 button, they can get back to the game (ideally the game will pause, but I guess that's not possible)

2. If you imaging a lobby of game rooms, showing the number of players etc, I would do this using a server driven HTML5 page. I would then want to be able to click on a page, and launch the game. When the game is finished, it should go back to that page.

Is there any way to do this kind of stuff?
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Post » Mon Jul 22, 2013 1:39 pm

You can use the 'Execute JavaScript' action in the browser object. For more complicated bespoke functionality I'd recommend writing a plugin.

Pausing the game whilst a modal appears is perfectly possible.

Bare in mind that wrappers like CocoonJS are DOM-less so HTML won't work when using them.
Moderator
B
72
S
14
G
11
Posts: 900
Reputation: 11,920


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983, marcoscodas and 12 guests