A Link to the Past style-area camera transition pans

Get help using Construct 2

Post » Sat Feb 25, 2017 8:25 am

I remember being able to replicate the camera transition pan from ALttP (when Link goes from dungeon room to dungeon room) in my gamekit project in an early build using lerp but ended up scrapping it. For what I mean, see this video: https://www.youtube.com/watch?v=DpHfauqv68U (at 0:07)

I've been wanting to bring it back now that I'm working on dungeon mechanics but I can't seem to figure out how to replicate it again no matter how hard I try with lerp and I've been going at it for hours. Could anyone help me out with it? The lerp behavior I'm messing around with is in the Objects sheet, in very bottom of the Doors event group.

Capx:
https://dl.dropboxusercontent.com/u/589 ... .9%29.capx
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Sat Feb 25, 2017 1:36 pm

I can't look at the capx right now cos I'm on my phone (hey, C3 will solve this problem! Neato.) but I've done this by spawning a load of scrolling anchors on start. Give each one an 'active' boolean variable. Pick the nearest anchor to the player. If its anchor.active is 'false' then set all anchor.active to 'false', and set the nearest one to 'true'. Set scrolling to always scroll to the active anchor. If you want it to scroll, add an extra object with a scrollto behaviour, and have that always move to the active anchor's location. Nice and simple since it only requires a few events.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 247
Reputation: 2,318

Post » Sat Feb 25, 2017 4:19 pm

mrtumbles wrote:I can't look at the capx right now cos I'm on my phone (hey, C3 will solve this problem! Neato.) but I've done this by spawning a load of scrolling anchors on start. Give each one an 'active' boolean variable. Pick the nearest anchor to the player. If its anchor.active is 'false' then set all anchor.active to 'false', and set the nearest one to 'true'. Set scrolling to always scroll to the active anchor. If you want it to scroll, add an extra object with a scrollto behaviour, and have that always move to the active anchor's location. Nice and simple since it only requires a few events.

Thanks to your suggestion, I started fiddling around with lerp again and got it to work. Thank you! :D
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Sat Feb 25, 2017 4:35 pm

Try modulo %.
As in scrollx % window width
Image ImageImage
B
172
S
50
G
183
Posts: 8,439
Reputation: 115,597

Post » Sun Feb 26, 2017 8:35 am

I would section it off. For starters to test it, I would use some semi-transparent overlays that are invisible in runtime to test out how to do it. I did this a long while back in Multimedia Fusion 2, but that was a long time ago.

A good practice, however, would be to keep your rooms on an even grid. You want a camera object that NEVER goes outside the DEFINED area your character is in, that way you can get to the side of the "grid space" without the camera going over to another "grid space".

I'm at work right now, myself, but I'm sure I could get an example of this at some point later on.
B
27
S
7
G
6
Posts: 268
Reputation: 3,852


Return to How do I....?

Who is online

Users browsing this forum: WesleyDeveloper9, Yahoo [Bot] and 4 guests