Two button Switch system

I mean like this:

Ok, time to let go of the tick idea :wink:

I think that maybe…

The actor you’re getting back from the trace isn’t the same as the actor with the event in ( put a print in the trace to give you the hit actor name ).

The way you’re doing it is fine, you’re just not connecting for some reason.

Print out the hit actor in the line trace, it’s the easiest way to find out what’s going on.

Hello people!

I need help with this cuz I have been here struggling for three hours. I am trying to make a camera switch system. There are two buttons ( < ; > ) and when you press the “>” button the camera goes from cam1 to cam2 and so on, so on… I tried to do this with variables but they repeat with “event tick” and I don’t know how else to trigger the update…

If you know , please help. Thank you!

Well, It works with integers. When the camera is activated, (The > button) it adds a 1 to the value, Then, the timer switches it, Its the same thing with the < button. The problem is the Event tick. When I want to add a switching animation, the sound and the animation play for x amounts of ticks…

Something like this…

I don’t see any camera switching?

Tick is not the thing to use. Just use a custom event.

If you want to switch cameras instantaneously, you can just activate the next camera, otherwise you need to use SetViewTargetWithBlend.

If you use a view target, it might be best to have all your cameras ( except one ) as external actors.

What’s in cam switch?

Ah, so not an actual camera switch :slight_smile:

Ok, so where is the event interact called from?

It’s just a normal line trace (Linetrace function is in the 3rd per. char.) and the function is used in the level blueprint… From there I use blueprint interface …

It works… I have doors and they are working fine. This doesn’t tho. When I replace the EVENT INTERACT in the camera switch for EVENT TICK. It works. But I don’t want it to update every frame…

Scratch that last comment.

Are you actually getting anything coming back from the character? Put a print string in the line trace to check it’s hitting something.

It won’t print it, But when I put Event tick, it works…

I know that the camera screen changes in the monitor actor and the two buttons are separate actors… I think I am going to scrap this whole idea and just stick to twenty buttons… Its easier but its more complicated.

The hit actor is identical to the buttons that I am pushing. The animation for the button press works so I don’t know what now

Ok, so the solution? I made another model and made it with 20 buttons (1 for each camera ) and switching is much easier than making the right and left buttons… Thank you for helping me :smiley: