Replicate Flashlight from Character
I am trying to set up a flashlight that is turned on by holding the F key. It works locally but I cannot get it to replicate across clients.
Here is what I currently have as a set up:
Character Blueprint: http://i.imgur.com/tLWj5aR.png
Flashlight Function Blueprint: http://i.imgur.com/sYksf02.png
Kind of at a loss on how to get it to replicate. I could be close, I could be miles away from the solution.
asked Oct 24 '14 at 10:52 AM in Blueprint Scripting
Try making a custom event that is set to "Run on Server". Use it twice for your F key, as you already did with your function. Also add an input for the bool. Let this event set your Flashlight bool.
Use the Event Tick with a second replicated event that Runs on the server. Pass the bool to this event too and call the normal toggle flashlight function from this event. The setup of the function can stay the same i guess.
:X This should work. :D sometimes i have a twist in my head too when thinking about the RPC system.
Follow this question
Once you sign in you will be able to subscribe for any updates here