Hi, i am working on a game, where i want to set different clocks. I can change the time on one clock, but as soon as i put in more clocks in, the reference is set to one specific clock. So i just access on clock from every other clock.
I tried to get the hit info from the line trace, and set the reference to the hit object but still i get the same problem. Can anyone help me please?
This is my clock. With the two buttons on the left, i can spin the hours counter clockwise and clockwise. Same for the two buttons on the right for the minutes. The buttons are in a widget class W_SetClock.
This is the graph of the widget. It fires four events, when i press the buttons, where the corresponding rotate function is called, on the actor class. The Problem is, the actor class is always the same. Lets say i got clock 1, 2, 3, 4. The actor class is always clock 1. I tried to fix that by the event at the top called “set clock reference”, where i set the clock.
This is where “set clock reference” gets called. You can see it in the top right corner. Its the blueprint of my player. I use the line trace to get the hit actor. When i hit the clock, i call the functions “interact” and “set clock reference”. The input parameter for set clock reference is my hit actor, which should be the clock, that interacted with. But still, when i interact with clock 2, nothing changes, but clock 1 changes. I don’t get any errors, it just doesn’t work how i want it. What am I doing wrong here?