So I watched the UE4 blueprint communication tutorials and I still can’t figure out how to get blueprints to share variables, custom events or functions.
I’m trying to make my dream fps game like unreal tournament meets doom with weapon alt and main fires, but if blueprints cannot share data with one another then I don’t know how such a game is possible.
BTW I’m using versions 4.5.1 and 4.6.1
Casting actor classes isn’t working either. It seems like Blueprints can only use custom events or functions among themselves which seems almost useless.
I already have weapon switching and weapons that have main and alt fires, but they cannot fire because they don’t receive input from the mouse or keyboard. Infact it seems that only the player receives commands and everything else just does nothing, and these get input actions from the player options dont work either.
The tutorials make everything seem soo simple, and they make it like you just simply create a custom function or event and other blueprints magically call them but this doesn’t seem like the case at . Even creating custom events that do absolutely nothing cannot be brought up or called in another blueprint.
Turning context sensitive off at first looked like the magical answer I was looking for as functions, variables and custom events that I made public show up, however dragging them into a blueprint and plugging them into my current blueprints code does nothing like it didnt even exist.
So my question is, is blueprint to blueprint communication really possible or has it not been added into the engine yet?, and if it is possible then… How the F do you get them to work…because iv been trying to make my game without asking for help, but now it seems like after a month of trying to do it myself it would seem that I cannot.
In variable settings you have to set it as Editable - it allows other blueprints to see this variable, when they are communicating. After that stuff with casting and magic should work properly
Yes as stated make sure the eye is ticked. Also considering using interface events.
Also in the beginning BP’s and sharing information between them is horrible. In fact there were days where i was literally smashing my head with violent face palms.
Just keep trying different things.
Eventually a little light goes on. And whalla. Hang in there.
Hello,
I understand how disappointed you are that it doesn’t works for you, but communication works fine. There are few things which can do troubles, mostly : forget to set variable editable (open the eye ^^) and not set the reference of the other actor on event begin play. But you may have another issue that we can’t figure without a picture of your issue. Don’t hesitate to show your troubles, one by one and people here will help you as much as they can to solve them.
When you create a variable, you just create a type of it. If your variable is an integer, you have to set its value to use it, or it will return 0. This is the same for actor variables, you have to set which actor in the level is referenced or it will return “none”. To do that, as shown, on event begin play you do a “set variable” which you can do by get actors or by “cast to” in level blueprint or in the actor itself like this
this is my weapon blueprint The code behind it is just a copy from the fps default project, in tests with shooting at the beginning of the map it does infact shoot.
this is my character blueprint which I want to call the weapon blueprints main attack.
Only started Nov last year. My only suggestion. Make 1 level. Call it experiments. Make plenty of folders and when you learn something. Make it in a folder. Then if you every need it again, you can merg, export or just go back to it for reference.
Either collapse nodes and give them a descriptive name or make sure you add comments.
And watch YouTube videos that you may not need, but I will put money down that you will learn a new way, a new variable, a new node or a solution you will use later.
Remember to take advantage of BP Interfaces and Event Dispatchers, as these are great methods of communicating between BP’s and sending data back and forth. I feel like a lot of people rely too much on casting and don’t give Interfaces much of a second look; they’re really useful.
People who don’t invest in building interface blueprint will eventually run into circular dependency, maybe corrupt their project(which Epic should fix really), and then maybe just rage quit and call UE4 a ****.
Even Epic’s tutorial relies too much on cast, I seriously think they should redo several entry level tutorial so they focus on doing interface for BP communication.
Cast is only safe for native C++ classes, but even then, interface still provides better long term flexibility.(ie. you can have one BP call the same event to different BP that implements it, with cast it’s very awkward to setup.)
I understand your pain. I’m really not trying to push videos or anything, but I did just recently start a tutorial series on a similar matter. After months of trying several inventories and converting and merging them, I realized my main problem was data transfer between blueprints. At some point, it just sort of flipped in my head, and I generally get most aspects of making things talk to one another. So in my tutorials, although its for an inventory system, the core of it is about how to transfer data and variables and whatever you need. So if you like you could follow along and maybe set up a base framework similar to let of your items and blueprints/actors talk. Here’s a link to the playlist if you still need help: