Download

Problem accessing variable in another blueprint

I was reading up on accessing variables from other blueprints. So I read the manual and am trying to do it with the care example. In my blueprint I made a variable called “TargetBlueprint”, and the manual says that under variable type I should find the blueprint I want to get information from and that it will have a _c . However, When I select “Sedan” there is no _c when I select the blueprint. Can anyone tell what I am doing wrong here. I am attaching an imageCapture.JPGe.

The _C is usually given to actors spawned in the world. Could you possible post a link to the tutorial your following to make it easier to assist?

The first part of this Unreal tutorial: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/BlueprintComms/index.html

Hello,
I am not sure but after a hunt, i found nothing in 4.6 release but in 4.5 release : https://docs.unrealengine.com/latest/INT/Support/Builds/ReleaseNotes/2014/4_5/index.html this ( under Gameplay and Framework ) : Types in blueprint pin tooltips and variable type pickers are now displayed in more readable format
which maybe is the reason of the _c dissapearing. The most important would be to know if it works as supposed with the variable you selected and if yes then doing a feedback to update docs.

It doesn’t work also even with out the _C. Here is another example of something very simple I can’t get to work.
. All I want to do is have the blueprint i am working in to access a boolean variable in another blueprint to see if its true or false. But I can’t seem to do it. When I create a variable I make sure to get the name of the blueprint, but it only shows my BP’s( without the _C )and my code will not let me access any of the BP’s info. I mean I can actually see the names of the variables and stuff in the other BP, but UE won’t let me use them:

Some example log:
Error This blueprint (self) is not a BPChair_C, therefore ' Target ' must have a connection
Error Variable node Get isHit? uses an invalid target. It may depend on a node that is not connected to the execution chain, and got purged.
Warning [4853.71] Compile of MyProjectile failed. 2 Fatal Issue(s) 0 Warning(s) [in 113 ms]

Can you show us your nodes?

Now it keeps crashing when I try to do this simple experiment. Can you try this out and see if it crashes, its very simple. I right click on a sphere and make a blueprint out of it, calling it BPSphere. In BPSphere I make a boolean variable, called boolTrueFalse, and I click the eye and make it accessible to any blueprint. I have 2 nodes 1)When user presses T, make boolTrueFalse =true 2)When user presses F, make boolTrueFalse=False.

Now I make a blueprint from a cube called “BPPrinter” that is simply going to print the value of boolTrueFalse in the blueprint called BPSphere. In this second blueprint I create a variable, and choose the variable type as “BPSphere”, the name of the first blueprint. Then I make a simple PrintString node, get the boolTrueFalse value from the BPSphere via the blueprint variable I created that is type “BPSphere”.

So as simple as it is it doesn’t work. And I know the logic works because even in the first blueprint, BPSphere I create a onTick to Printstring the boolTrueFalse variable and it works fine.

1)Why does this not work?
2) (optionally) I don’t know why but now just shuts down UE4 when I hit play for some reason. I can’t believe how many hours I’ve spent on this.
If I could get some help on this that would be great.

/cough Someone already tried to help and asked to see your nodes.

Which blueprint does this event happen in? You might not actually be capturing the player input.

Godling, I already wrote that its crashing my system, what am I supposed to do? Xendran, yes it is capturing, because I put print statments after each node to make sure they are firing.

If your UE4 editor is permanently crashing when you open your blueprint file, that’s a big problem and should be reported.
If it isn’t, show us your nodes or we can’t do much for you.

Try to delete your engine file and reimport full engine. Even with a closed subscription, you’ll have access to your version of the engine. As this is only the engine it will not have effect on your projects. That done, if you always have issue then follow Xendran advice : Report to answerhub or use print screen and gimp to export a jpg of your blueprint (which is not related to ue4 so will not make it crash).

Thanks Fen. I am still a paying member and will continue to do so. But I’ll delete the engine and reinstall it and let u know what happens. Thanks for the suggestion.

Well I seemed to have solved the problem after reinstalling. Apparently in the main editor, when I select the object that accesses the other blueprint, under the field “Default”, I HAD to select the blueprint name again. Here are the screenshots. Let me know if I am missing something, or if there is another way to do this.evidence1.JPGevidence2.JPGevidence3.JPG