Branch node is never reached

So I’m working on a tile based game where each tile has a number attached to it and I wanted something to happen if a character is on the same tile as something else. I had a branch node set up so that if that’s true then it would print something on the screen. However, even when the two things are on the same tile, the message never appears. In fact I keep getting an error message saying something like “Accessed None “Item” from Node Branch”. Am I using the Branch node wrong?
EDIT:Added a photo of what I’m trying to do.

Can you take a couple of screenshot of what you are trying to do? It will help people understand your problem easier.

Without knowing exactly what you are doing I would say yes.

My guess is that you incorrectly accessed the actors on the tile or somehow don’t correctly move a reference around.

“Error Accessed None” means that the reference you provided and which is linked as next item is invalid. An empty reference usually just pointing nowhere. Next up we have the name of the variable that’s empty: “Item”

So based on what you said so far I would suggest checking if “Item” is a valid reference during runtime.

Something that will probably come in handy seeing how you use “Print String” for debugging would be a “Break Point”.

Here’s a documentation page about it. Quite handy for debugging blueprints!


I should also point out this is all in the class of the non-player actor. You do use Event Tick when you want to check something as the game goes on right?

I think you might be right, because when I replaced the variable Index with the actual number it prints the string when the player stands on that tile. How could something be invalid?

Well as far as I can see it’s the “Player” variable.

Did you reference an object from your level to that anywhere? Just creating the variable won’t do anything.

You have a few possibilities. If you check via overlap / hit events the other actor can be casted to your character and you can use that if it’s actually your character.

If there’s only one character you can do “Get All Actors Of Class” and get index 0 from the resulting array (kinda dirty way to do this).

Or you place your character beforehand, expose the variable and select your character in the level for every tile.

There are a few more ways but since I don’t know your exact setup, needs and quite frankly don’t have the time to explain the whole thing about object orientation I won’t go into more detail.

Read up about that (“that” being “Object Orientated Programming” / “OOP” and it’s principles. It’ll help a lot!