How to make a boolean accessible for multiple blueprints?
Hey there, for a little game project im having a bunch of weapons which i can pick up and run around with (and fight but thats coming later). So my problem now: I need a bool variable which indicates if im holding a weapon right now or not so i can check if i can pick up one or if i have to drop the one in my hand first. (pick up and drop is on the same button) So how can i make a boolean variable accessible for both of the weapons? I tried it with public variables and interfaces but nothing worked :/ Maybe someone of yous can help me there? :)
so this is the setup of my blueprint of the weapon. the "holdingItem" bool is the one i want to have accessible for all other weapon blueprints.
Maybe I'm misunderstanding, but perhaps a better way would be to store the boolean variable on your character, and make it so the character itself will or won't pick up a weapon.
But to answer your question.. If you want to access variables in other blueprints, you just need to cast to them.
answered Dec 10 '15 at 02:41 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here