Referenced BP variables assumed to be local

I have a playerController with the variable ‘TimeLeft’ in it, I use that variable in my pawn by casting to the playerController class and pulling that ‘TimeLeft’ variable straight out from it into my pawn.

Now if I add a variable by the same name in my pawn I can’t change the type of it because Unreal thinks it’s already used in my pawn BP (which it kind of is). If I right click on my pawn and choose ‘find references’ it’ll also think I’m asking to find the playerController referenced variable.

I can however delete the pawn variable fine without deleting the playerController referenced ones.

It’s of course a bad habit and came across it by accident but it might be wise to look into this.


Hello ,

I was unable to reproduce this issue. If you could provide a screen shot of the blueprints that are having the issue, I will be happy to assist you further. You are getting any sort of error message I would like for you to include that as well.

Hello ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

I kind of did a fire and forgot on this post so pardon the late reply - I’ve replicated the problem in 4.5.1. It’s really pretty simple so not sure if I just wasn’t clear enough or it’s something else.

The image attached shows my ‘foobar’ variable type greyed out after the same named var ‘foobar’ has been referenced from playerController A. If I delete the ref to PC_A’s ‘foobar’ the local BP’s ‘foobar’ variable type becomes active again and I can change the type.

Hope that makes it clearer. I don’t know if this would actually cause code problems or not. If it does it’d be nice to have some warning message when you do this, and if it doesn’t then this is a small bug.


Hello ,

After looking further into the issue. I was able to reproduce the problem and I found that this is an issue in 4.5.1 but that it has been fix in our latest internal build and that it will be available soon in a released version.

Make it a great day.