Maybe someone can help me out, because I am losing my mind.
I have multiple instances of a Blueprint, and I gave each instance their own Tag as an identifier. In the Blueprint of the actor, itself, the value comes back as expected:
Given that it does go back to six, the problem seems likely to be in where you’re reading the 0. Print the name of the actor as well during the prints and see what that tells you (each instance of an actor will have a different print string name)
What you’re saying is correct, but I’ve already done all that.
The issue I need solved is why the variable changes value depending on if it is called in the instanced Blueprint versus its own Blueprint. I don’t know how much instancing you’ve done, but retrieving a variable within an instance seems to not play nice with the Engine.
Unsure though.
(PS: Tags are a better IDer than the Print String Display Name.)
No I know, just thought using both might be a clue to the issue. Never had any issues with variables from instances. What does the reevaluate function do?
“Inbound_Train_Instance_Director” is the variable.
It is:
Evaluated in the Instanced Blueprint as “6”.
Then when it is referenced in its own Blueprint (subsequent), it is evaluated as “0”.
When the REEVALUATE function is fired, it reevaluates the exact same variable, but this time, in the Instanced Blueprint, again, but after it has fired in its own Blueprint. The value, again, is “6”.
So, one variable changes value from 6 → 0 → 6, depending on where it’s called, never being altered or changed. Very odd.
Oh, trust me, I spent way too much time doing just that, trying to figure out what’s going on. I’ve pivoted since then, and actually found an easier way.
Correct / Agreed. To clarify, there was no loop in my ACTUAL code. I only did it to illustrate for this Forum post (a shortcut, instead of posting a ton of pics). The result was the same without the loop, but yes, NEVER add delays in loops; it was a demonstrative typo on my part. I meant to put it BEFORE the loop function.
There’s clearly a rule I don’t understand about instancing and reference variables.
I’m marking this as resolved, because your (and Pezzott1’s) suggestions are absolutely correct, and exactly what I did, with no luck, but having pivoted successfully, I’ll put this issue behind me…