[SOLVED] Switch camera between two object


Hi, i was trying to switch the camera between two object with just one button.
Im not a pro on Gdevelop so i ask you what i miss to make a loop that switch correctly the camera between two Objects.
Thanks
Gabriele
Sorry for bad English

What exactly do you want?
Camera moves when button is pressed, and goes back when button is released?
Or one press moves the camera, and another press moves it back?

Hi,
The second one
Thanks

Boolean Vaiables can be toggled.
Condition:
P key is pressed
trigger once.

Action:
Toggle Scene Boolean Variable Playercam
subevents:
condition: if Boolean Variable Playercam = false / Action: Center cam on Player
condition: if Boolean Variable Playercam = True / Action: Center cam on Chicken

Thanks for the answer but It doesnt work

Solved
My mistake

2 Likes

2 subevents.
You tried to put both events as 1, which cannot work.