Hello, how i can cast through gamemode to clients? i want to show collectibles left on VIEWPORT when collecting object , on server is working normally, but it doesnt appear on VIEWPORT client, but when i just delete CAST TO GAMEMODE, it will appear, but without remaining collectibles,…how i can fix it?
GameMode doesn’t exist on clients. If you wanna send some stuff from game mode to clients you can use game state, player state or player controller for that.
aah oke thank you
Use game state for this, make a variable and in your widget just get the game state cast it to the game state you created that has the collectables count variable and get it.
Somethings to note, once you collect the object you should update the count through server, you can use the RepNotify as well to update the widgets for all players or use an event dispatcher after you have updated the collectable count.
ok i will try it thankyou
ok i tryed with state - didnt work at all, even hit and actor destroy, but then i tryed custom playercontroller and bingo, its working so thanks for advice