Weird compile error with inter-blueprint-communication using variables


In my pawn-blueprint (named “VR_Pawn”) I have a boolean variable “Communication Test” and I want to set the material of some attached mesh depending on it’s state.

In another actor-blueprint I set this variable like so

The problem is that when trying to compile the actor-blueprint I get the error
-> Error This blueprint (self) is not a VR_Pawn_C, therefore ’ Target ’ must have a connection.
-> Error Variable node Set CommunicationTest uses an invalid target. It may depend on a node that is not connected to the execution chain, and got purged.

Why is that ? Target is connected so what’s the problem here ? I don’t get it… :frowning:

Cheers !

You are never executing the cast node plug it from the tick node into the cast node and then into the set communication test node . And you shouldn’t really get into the habit of using event ticks too often better to find other ways to do things here you’re using it twice just to do simple stuff that can be done with functions or other ways

yeah, that was really stupid indeed. sorry for that. should have known that. dohsorry !
but what would be the best practice to call an event in my pawn from the other actor in case i want to change the state of my “communication test” so i can react to it in my pawn ? Calling a public function in my pawn whenever I want the state changed, I suppose ?