Announcement

Collapse
No announcement yet.

[Multiplayer] How do I get a variable from an event tick to the server?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Multiplayer] How do I get a variable from an event tick to the server?

    I'm making this game where the player has to press some buttons on a console, and I would like to get a variable to the server to let it know that the button is being pressed.
    Now, the complicated part is that this game is in VR, and I wanted to make these pretty buttons that are actually "clickable", so I made this animation system using Event Tick and setting the relative location of the buttons according to where the hands are located.
    This is working fine, and I only want the events to fire only when the button is fully down, and here is where I'm getting my problems. I used a DoOnce node that resets when the button is not on it's max position, and after that I placed a custom event. This one fires on the client side but never fires on the server side. I tried some other things like event dispatchers, or setting a replicated boolean... But it only goes on the client side.

    Here is my setup:

    Click image for larger version

Name:	logic3.PNG
Views:	1
Size:	110.9 KB
ID:	1196074

    As you can see on the image above, here it fires the logic when the pawn touches a button. This is the pawn blueprint.

    Click image for larger version

Name:	logic2.PNG
Views:	1
Size:	162.3 KB
ID:	1196075

    Here is a screenshot of the panel blueprint logic (where the buttons are). This is fired everytime you overlap a button.

    Click image for larger version

Name:	logic1.PNG
Views:	1
Size:	215.9 KB
ID:	1196076

    And here is the logic of the animation, also on the same blueprint. You can see there the dispatcher event I created, which is being fired correctly by the client but not by the server.


    So, I don't know what else to try. I really need this to be working correctly, else I just got some pretty boring buttons without any "feel".
    Is it because I'm trying to replicate something coming from an Event Tick?
Working...
X