Cutscene and Camera??

Get help using Construct 2

Post » Sun Feb 09, 2014 8:31 pm

Was wondering if this was possible in Construct 2.

You know in some games when they show the level overview first before the player gets to play the level itself. Is there a way to make a camera scroll to a certain location without using any keys? Or is there a certain plugin that makes a cutscene somehow?

B
8
Posts: 35
Reputation: 388

Post » Sun Feb 09, 2014 9:41 pm

Completely.

The easiest way is make a small square (like 4x4) and make it invisible. Call it "camera" or whatever you want. Then add the "Scroll To" behavior to it and nothing else. Have a variable (cutscene, for instance) and use that to decide if it follows the player or not. If cutscene = 0, every tick set camera.x to player.x and camera.y to player.y. You can fancy this up with lerp, but same concept.

Then, when you're trying to do a cutscene, set cutscene = 1. It will no longer auto-follow the player and you can use events to move the invisible camera object to various places. Move it over time to make smoother movements, particularly using equations like lerp (see manual).
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Sun Feb 09, 2014 9:51 pm

Once again, @c-7 is beats me to the punch with that big, juicy brain.

Try playing around with multiple Scroll to objects, too. You can get some interesting effects, like zooms and such. When you have multiple scroll to objects, the game tries to average the camera position between the two so both objects are in view. So, with a combination of other tricks, you can create some really unique camera movements.
B
15
S
4
G
1
Posts: 169
Reputation: 2,179

Post » Sun Feb 09, 2014 11:21 pm

@C-7, @RandomFellow

Thank you very much for the replies ^^ i appreciate it. Hmm, so I'm guessing that i need a list of events according to the cutscene that I need? as in...a lot XD. you know like for RPG's and starting tutorials and all that. So I can go switch from one object to the next with the camera Sprite? ^^

BTW, i really never understood what that lerp was doing exactly?
B
8
Posts: 35
Reputation: 388

Post » Mon Feb 10, 2014 3:06 am

[QUOTE=iceFlashEX1] @C-7, @RandomFellow

Thank you very much for the replies ^^ i appreciate it. Hmm, so I'm guessing that i need a list of events according to the cutscene that I need? as in...a lot XD. you know like for RPG's and starting tutorials and all that. So I can go switch from one object to the next with the camera Sprite? ^^

BTW, i really never understood what that lerp was doing exactly?[/QUOTE]

Haha @RandomFellow my bad!

Right, cutscenes take a lot of planning. I use a variable for a timeline--when something completes, add 1 to that variable which triggers the next actions, etc.

Lerp is a different way to move from point a to point b, basically. It linearly interpolates (lerp) between points, what you'll see is something that starts out quickly towards a value or position and decelerates as it approaches its destination. This is a simple way of easing something into a position instead of an abrupt stop.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Mon Feb 10, 2014 10:32 am

@C-7

I see thank you very much for the explanation ^^. One more question though. Say i want to create a series of dialog, like lengthy instructions or character dialog...where can i actually put it provided i can see it?
B
8
Posts: 35
Reputation: 388

Post » Mon Feb 10, 2014 1:31 pm

Use the text or spritefont objects and, in your events, use the "set text" action to change the text. So use a single tet object and just change the text in it each time. Just be sure the text or spritefont box is big enough to fit your text.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Mon Feb 10, 2014 5:04 pm

@C-7

well you see, what I meant was where can I store all these text. Is it supposed to be in an array as i read or can there be other ways to store it?
B
8
Posts: 35
Reputation: 388

Post » Mon Feb 10, 2014 10:36 pm

You don't necessarily need to have a lot of objects to control the camera at least. I use one generic sprite I call "focusSprite" and just change it's position depending what's going on in the scene. Then, just destroy it when the scene is over. That way, things won't get over cluttered with extra objects and make it easier to work on more cut scenes along the way.

I haven't messed with anything but arrays so far, but they're what you want. They're basically databases in Construct2, the way I understand...
B
15
S
4
G
1
Posts: 169
Reputation: 2,179

Post » Tue Feb 11, 2014 3:40 am

The text part is up to you! I just change the text in my events. You can also store it externally and load it via json, load it in an array (though you'd still need to do it via events or load a big array via json), or any number of ways to do it. That part's up to you :-P
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Next

Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], jbr190, zenox98 and 39 guests