Hey guys, so im trying to change a boolean value from either of the players.
One player is hosting the game and one joins.
This boolean is supposed to check between 3 animations which one to play off from.
Booleans are replicated.
It does not trigger the event, i have tried many different ways.
i will send the latest method, maybe it will give a more insight.
Apparently something wrong with the image uploading here, but heres the last link to the last picture
I tried on repnotify, and in the function i called a set. But that makes the button unclickable and nothing happends… What the hell.
Boss card true pin, not connected to
Sets Boss Animation 2 on purpose?
The way replication works is:
- Player calls a server function.
- Server changes the replicated variable.
- Variable value is replicated to all clients.
So you must change the value of bool in your
Below is an example of How to replicate variables. (Do this in PlayerController)
So i did this, but you see, the boolean comes as true at all stanges, until the event construct is triggered and the print string shows it as false at joined client, even tough its replicated.
Yes, because apparently it doesn’t work to send a custom event from the server to all clients to an custom event inside an umg?
I tried the thing you said holy breath, didint work! I thought I understood replicated and how to use the server to send information, apparently not lol, so it still goes to false right after event construct, but it stays true before that I seen it in print strings. This is so confusing
don’t use rep notify for this. Rep notify is useful when you need something to happen once the value is replicated.
plus the server doesn’t call rep notify function.
I didint use repnotify, but I just tried to change the value after replicated didint work!
may be its because you check in event construct, but the widget was already created.