Hey everyone I was working on my first project in ue, I cant set Boolean with custom event or function from another blueprint idk what’s wrong I check it everything but i cant figure out… can i help me?
Prop Blueprint
Hi there,
Is your line trace actually detecting the Hunter character? Can you add print screens before and after the cast to Hunter Character node? Also, as you’re tracing using Visibility Channel, so, either Capsule or Mesh should be blocking that channel. Can you please show the collision settings of your Hunter character?
Thanks for checking. It looks like the line trace and cast + function execution is working as expected based on your reply to LFA.
The next thing I’d check is the state of that ‘CanIFire?’ boolean. In the blueprint on ‘Event Tick’ print the value of the bool. Do you see it change from printing ‘True’ to ‘False’ when the ‘FreezeCustomEvent’ is fired?
I think I was found a problem that’s a problem come to I’m not sure, but while the boolean is false on the client, it’s not false on the server, so to summarize, the boolean set is only done on the client, and it remains steadfast on the server.
That means you have a replication issue; you want to make your line trace replicated for multiplayer. This is a quick video; you can find other tutorials on this topic. You variable is set as replicated, but your functions need to run on server and then multicast: Unreal Engine 4 LineTrace Multiplayer Tutorial - YouTube