Hello guys! Just getting started with unreal recently and have been working on a small project with the puzzle template.
The problem is, I’m setting a variable of a child blueprint from a parent/manager blueprint. And the variable is set on project initiate (beginPlay) and it prints out its correct value on beginPlay. But when I print that variable on a tick event, calling tick event from the manager and then calling a custom event from the child which prints out the value of that variable, it prints out all 0 instead of the custom variable.
Here are the details:
In PuzzleBlock (child object) the Initiate event (called by the parent object when spawning this object) set PlayIndex to a certain value and it prints out its value (0,1,2,3…etc)
Then in PuzzleBlock (child object) at **OnBeat **event, it prints out the value of PlayIndex (set before on initiate) and it became all 0. As if Initiate never happened…
When I print out PlayIndex on other event such as when clicking the child it works fine. I don’t understand why this specific event would cause this specific variable to be 0… The variable has no reference in any other places…
I can work around it by creating the whole ticker system on the child object and it works fine, but just curious about why/how this is a problem and wonder if that’s because of my lack of comprehension of how Unreal works…