Array OnRepNotify replication doesn't run on server
When I set an elem in a replicated array, or add one, the OnRepNotify event doesn't run on the server, only on the client. Yes, the actor is set to replicated, I set it on the server, and try to print a string then, and only the Client writes it out. It could be reproduced in a clean project. Just press G, while starting it with 2 PIE windows.
It has a long history:
Thank you for your time (probably) Kyle!
asked Nov 18 '16 at 10:25 PM in Bug Reports
Y'd better using Playercontroller to transfer variable to Gamestate : )
answered Jan 11 '17 at 03:07 AM
After speaking to our developers, it appears that rep notifies are not called on the server for properties created in c++, but they are called on the server for blueprint properties.
I've looked into your project, and used a bit of a different setup that seems to be working on my end. Give it a shot:
Let me know if that helps.
answered Nov 30 '16 at 02:43 PM
Sean L ♦♦ STAFF
I been further testing this. Set array element and add array element do trigger RepNotify, unless they are inside a "For loop",(a for each or each with break or normal for, doesnt matter wich one). I dunno if this is intended to skip the notify call cuz of the many "simultaneous" calls to the notify or is just a bug.
answered Aug 19 '17 at 02:03 PM
This is a bug that i hope is never fixed. With this bug u can choose when to notify and when not to notify. When using arrays, after a lot of changes this allows you just to notify once, at the end, instead of a lot of notifies in every change you make to a array with set elements or add functions.
answered Sep 06 '17 at 01:53 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here