How do I detect when my zone-based camera is transitionning?

Get help using Construct 2

Post » Wed Sep 02, 2015 9:26 pm

Hi!

I'm trying to replicate the 3C of GB Zeldas, as a small exercise.
I currently have some really basic stuff, as movements, sword attack, graphic placeholders.

What I want to tackle now is the camera. I'm using the famous zone-based camera movement from https://www.scirra.com/tutorials/747/zo ... a-movement and it works pretty well. I just have one problem:

I want to pause the player movement (and all animations/NPC behaviors) while the camera is moving from one screen to another, like in the original games. It prevents the player from moving without properly seeing the scene, and also prevents him from getting hurt etc. My basic idea is to disable the 8direction movement for X seconds while the transition is happening, or even better, with a boolean.

My issue here is I don't know how to detect when the transition happens. I don't think I can use the zones for that, even with unique IDs. I really don't know how to detect this particular situation.

Do you know how I can detect when the transition is happening?

Thanks a lot. You can find the corresponding capx here: https://www.dropbox.com/s/qt0x4v07qfo10ry/testZelda_ScirraForums.capx?dl=0

I have small additional questions, but one thing at a time. I'm not sure if It's better to create another topic or just ask here.
B
6
S
2
G
1
Posts: 39
Reputation: 605

Post » Wed Sep 02, 2015 11:52 pm

This should work for you:
Image

and please use PickedCount = 1, not 1 = Pickedcount, I realized that looks pretty ugly :D
B
10
S
2
G
1
Posts: 51
Reputation: 761

Post » Thu Sep 03, 2015 11:15 am

Thanks a lot! I did not know the PickedCount expression, and it's really helpful. I don't know why, it didn't quite work at first: there was some time before the event triggered, and the disabled movement occured some time ago (but the pickedcount was instant and correct, it was really weird).

All I changed was trigger the event and the actions in two differents events with a boolean and it worked:

Image

for NPC animations and behaviors I think that if I simply test the overlapping of a zone with the player AND the NPC it simply should work.

Thanks again!
B
6
S
2
G
1
Posts: 39
Reputation: 605


Return to How do I....?

Who is online

Users browsing this forum: beohs and 14 guests