camera array

hey everybody, this should be a fairly simple thing im attempting, but i dont have the time to learn arrays from scratch.

im creating a row of cameras and i need to cycle through them using left and right.
i can do it with a multigate but thats a linear cycle, i need to be able to go back and forth.

can anyone help me?
thanks

U might wanna do it this way.

tried matinee yet ?

thats pretty much the way i already have it, the issue is i need to cycle back and forth between cameras, so like start with camera 1, then scroll to camera 2, then 3, then back to 2, then back to three again, then onto 4 etc. using left and right keys.

there must be some kind of array method that i cant figure out.

you need an array of camera and integer variable for keeping the index of the current selected camera in the array,.
then you just need to implement two macros for cycling next and previous
check the attached screenshots for the macros

So finally what you need to do is to get the camera from the array using the calculated index. and then blend the current active camera with the one you got

ah this looks good, i think you got it, my only question is; how do i get the blue target array output? or rather, what variable type is that shade of blue?

this will help

Where I referenced the camera actors U may choose to reference the individual camera element of a camera array .

The concept should be well clear of what is done . Run the script in a fresh level and see what happens then proceed with implementation . I used level BP . If U want it can also be a class BP too . Ur call . Pleas a lso go through any doc or vid of how flipflpop channels work…

when you create an array , it’s of a specific type and the “get” function always returns the type you have originally created your array with

in case you are asking what is the type of a camera then it is “CameraActor”.
checkout the attachment

][1]

Note : whenever you create array or a reference in blueprints to objects which are ultimately classes try your best to go for reference to the object.

was this your answer ? did you manage to solve the issue ?

almost, almost there.
the previous solution works like a charm, however i need to add a second functionality.
each of the cameras in the array looks at a specific object, a row of houses in this case and i need to be able to toggle the house meshes on and off as each camera looks at them.

no idea how to pull this off really. i think i need a second array running simultaneously with toggle visibility nodes.but i dont know how to integrate the two together