Camera between 2 obejcts and racing AI

Get help using Construct 2

Post » Tue Oct 29, 2013 6:03 pm

Hi guys, i am making a racing game and because it has 2 players mode, i need a camera that keep both in view, but i cant do it. (alredy tried some things that i found here, but none of them workded.
Also, i need a "AI" for the PC controled car.

Here is the link: for the capx
https://www.dropbox.com/s/r4nw653yc4677ou/MiniCrazyRacers.capx
B
7
S
3
G
1
Posts: 18
Reputation: 1,434

Post » Tue Oct 29, 2013 6:37 pm

First error:
Window Size is the size of the screen (how much can you see on screen)
Layout Size is the size of the level.

Add the behavior Scroll to to the objects you want the camera to focus between them.

There are different implementations for the enemy car AI, but the most logical and simple one is that the enemy car should follow a specific track/route. The behavior Pathfinding should come in handy here.
B
49
S
15
G
6
Posts: 534
Reputation: 7,195

Post » Tue Oct 29, 2013 6:51 pm

I made window size the size of layout because while i didnt had the camera, i wanted the game to be playable.
B
7
S
3
G
1
Posts: 18
Reputation: 1,434

Post » Tue Oct 29, 2013 6:56 pm

[QUOTE=TGeorgeMihai] First error:
Window Size is the size of the screen (how much can you see on screen)
Layout Size is the size of the level.

Add the behavior Scroll to to the objects you want the camera to focus between them.

There are different implementations for the enemy car AI, but the most logical and simple one is that the enemy car should follow a specific track/route. The behavior Pathfinding should come in handy here.[/QUOTE]
I alredy tried pathfinding, coulnd make it work.
Is there a way to make the camera zoom out if the players(cars) get too far from each other?
B
7
S
3
G
1
Posts: 18
Reputation: 1,434

Post » Wed Oct 30, 2013 12:16 am

B
49
S
15
G
6
Posts: 534
Reputation: 7,195

Post » Wed Oct 30, 2013 2:33 am

Thanks. Done (almost perfect).
Now I am having problem when exporting. If i export to exe (and HTML when opened with Firefox) 2 things stop working, one of the back buttons and the OK (in the stage selector). When i open with Chrome, it bug in the menu screen, it doesnt leave.
Here is the new version:
https://www.dropbox.com/s/2vjv1kgbmd73uht/MiniCrazyRacersV2.capx
B
7
S
3
G
1
Posts: 18
Reputation: 1,434


Return to How do I....?

Who is online

Users browsing this forum: Bootfit and 18 guests