Hello,
I’ve having a little bit of trouble with a variable. In my project, I use a boolean variable as a sort of “Do it once” node, but with a kinda expanded functionality. The problem is, it does not work as expected; I debugged, as per usual, however, when I was debugging, I found a rather awkward behavior. Let me explain and add some screenshots:
I created a new variable called “Do Things” (Erased the old, which was a boolean, and created this variable to make a clean test) on which I store an integer value, with a default value of ‘69’
When a thing happens, I update the value with a new value, ‘3’ in this case. Everything okay so far; the variable has ‘3’ as value
However, when I continue debugging, and advance to the next debug point, the value has changed to it’s default value, ‘69’
The variable (as is new) has no setters or getters more than those on the screenshots, so, WTF?! I just clicked on “Resume play-in-editor session”, which teleports me to the second debug point shown; the “Preview” flicks, so this second point is happening after the game does code again (Code → Game → Code).
It should be noted that this project is modifying the “First Person Template” given by Unity, and this blueprint is the one named “BP_FirstPersonCharacter”, so it may have something to do with it, although I don’t get how.
Thanks in advance!