# How do I a various game mechanic

Get help using Construct 2

### » Mon Aug 28, 2017 7:33 am

Hi guys I recently saw this video https://www.youtube.com/watch?v=CY7NUHn6GQg&t=344s and I was thinking how would I do this in construct 2? Would anyone be able to help me?
B
31
S
16
G
12
Posts: 318
Reputation: 9,854

### » Mon Aug 28, 2017 9:57 am

It's just a basic 2d platformer game.
There's tutorials on youtube showing how to make a basic 2d platform game using Construct 2
B
36
S
8
G
2
Posts: 13
Reputation: 2,884

### » Mon Aug 28, 2017 10:31 am

@suzannegrey He means the bit where the window moves
B
7
S
2
Posts: 6
Reputation: 577

### » Mon Aug 28, 2017 11:31 am

@suzannegrey I mean the window meachanic
B
31
S
16
G
12
Posts: 318
Reputation: 9,854

### » Mon Aug 28, 2017 12:11 pm

Good Morning.
Very easy mechanics, ceiling down every tick, objects are created periodically on the sides to reach the player, and jump on the wall.
Huemerson
B
27
S
18
G
22
Posts: 114
Reputation: 18,898

### » Mon Aug 28, 2017 12:13 pm

NW.js Documentation - Window

Move and resize window

The window.resizeTo(width,height) method resizes a window to the specified width and height.

The window.resizeBy(width,height) method resizes a window by the specified amount.

The window.moveTo(x,y) method moves a window's left and top edge to the specified coordinates.

The window.moveBy(x,y) method moves a window a specified number of pixels relative to its current coordinates.

In C2 you have to write:

Code: Select all
`"require('nw.gui').Window.get().moveBy(x,y);"`

or
Code: Select all
`"require('nw.gui').Window.get().moveTo(x,y);"`

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

### » Mon Aug 28, 2017 6:17 pm

@korbaach Hi thanks for the reply I have tried your method but I dont know how to get it to work or it doesent work which is highly unlikely! Did it work for you and how did you get it to work due to your project runs in the browser not a window is there a way to change this so I can see it work please help me
B
31
S
16
G
12
Posts: 318
Reputation: 9,854

### » Tue Aug 29, 2017 12:33 pm

This is only possible with NW.js..
..you can't move other people browser(chome,FF,IE..) with multiple tabs open..

nwjsWindowMove.capx
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

### » Tue Aug 29, 2017 1:17 pm

@korbaach Thanks for the reply! Sorry I have absolutely no understanding with Nw.JS so do I need it installed on my computer for this to work? Because your example doese'nt work on my computer so should I install it?
B
31
S
16
G
12
Posts: 318
Reputation: 9,854

### » Tue Aug 29, 2017 2:22 pm

Official Construct 2 Manual

NW.js object

Exporting desktop apps with NW.js

..also..you can't make desktop app. with C2 Free Edition...
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072