So I have this variable “canInterctDecoy” that turns true or false acording to a certain overlap.
And as you can see in the yellow print the “canInterctDecoy” switches properly, BUT the same variable in the purple print doesnt switch and always stays true as you can see in the second image:
I think you’re not testing what kind of actor is doing the overlap.
It’s no good casting the player to the player, cause that’s always going to work. You need to cast the overlapping actor to the player, that’s why we use a cast:
But why and how the same bool variable can be false and true at same time? as you can see in the images the yellow print changes if its overlaping or not, while the purple print always stays true and they are the exact same variable.
And unfortunately you sugestion dindt fix the problem
" This. IMO you need to [check if what you are colliding with has the BP Interface] if it does then = true."
this is what i am doing, but not with interface, I call the funciton “Can Interact” and send a value true or false if its colliding or not:
The “can interact” event recives that bool and prints the value as yellow:
AS you can see in the prints the event “canInteract” recives the right value and sets that value to the variable “canInteractDecoy” (notice that yellow print)
The problem is that the same variable “canInteractDecoy” can be false in the yellow print as the same time is true in the purple print
That branch you mentioned need the condition given by the “canInteractDecoy” but since in that purple part its always true, I unplugit just for testing
But for now i just nee to know how can be the same variable true and false at same time
Yes i know its impossible thats why this buggin me out.
I just conected the “canInteract” event output to the purple print and the branch and works how was supose, i just dont get why doesnt work with the variable, and Im afraid that i may need that variable in the future
I humbly suggest: if you are going to use overlaps, always check if valid desired actor then logic after branch. If not you can trigger an overlap more than once unintentionally.
Dont need to bother with that its working for now, i will just hope i dont need that variable in the future probably its not a big deal anymore. But thank you very much anyway for the help
Like this or reverse? this is in the player character blueprint and here i check if the decoy is valid, you menat this or the other way? (in the decoy i check if player character is valid)