
In my team spawn functions I have an Interface that passes data to a Character Parent. Since there is a Function to spawn Player Team and another Function to spawn Enemy team, I indicate which team the spawned character is on here.
On the other side of the Interface is the Character Parent. It is here that I load various character stats like health and other data pulled from a Data Table. In addition it is here that I SET the isPlayer boolean VAR. In debug I pull all the various data points and when I click on a character during run time it prints out all the various data points I need to know… like is the isPlayer true or false.

The problem is, the isPlayer setting seems somewhat random. Like, on my Player Team I can have 3 False and 1 True. I should note that it appears the first spawn point character is always True, with 2-4 being False. On the enemy team, all four are false, but it should be.
If I change the Default Value of isPlayer VAR to False, I get the same pattern.
I put in a debug before and after the isPlayer VAR is SET, and get the same value.
Any ideas?
Boolean through an interface is reliable,
which would suggest the error is coming from another part of your blueprint code.
Try adding debug prints and breakpoints to your code to find out where it’s getting called from and how often interfaces are called on different actors.
2 Likes
The only isPlayer VAR is in the Character Master, so it cant be coming from somewhere else.
I tried creating a local VAR in the Team Spawn (enemy/player) Functions, and set each to False/True respectively. I still end up with the same result. Only the first Player Team Character is True, the rest of the Player team is false, and all of the Enemy team is false too.

The RED output is right before the GameMode/Function sends data to the Interface. The YELLOW output is right after the Interface in the Character Master.
You can see here that it goes into the Interface True, but only one actually comes out True.
Figured it out. Dont understand why it works, but it does.

In the interface checking ‘pass-by-reference’ worked. I had to create a local variable in the functions that creates the team members and then hook that to the interface call.
this shouldn’t be it either
should be supper straight forward
any chance you could upload your project to github or at least the assets that create problems
not exactly sure how to manage files in UE. I have been wondering about this for backup purposes. My current project is a 7GB folder…