How to use character input in BP interface

so im making a Parcore shooter (no not karlson) and in it I have a gun that recoils you either backwards or forwards depending on a flip flop. that works perfect. I need a visual cue however to show what direction you will launch to. I did that through material switching. I also have the material switching fine, when I set the grapple value to 1 and 0.


the issue is I cant change the values. because there’s an input but im unable to switch like I want to. I know this is something im doing wrong because im a noob, but hopefully one of you can help.

Please be more specific on what you want. If possible show some gameplay.

1 Like

Not really much gameplay to show. What I want is basically this:

When you click f on the player, it sends a command for an actor attached to the gun to change its material. I tried to cast but I don’t understand what the object should be.

Interfaces are designed for calling a single function on multiple objects. Instead, you should create a new variable in your character blueprint, set it to the correct object type, and change its default value to your visual cue actor. Now you can call the custom function from your player blueprint. More options for actor communication can be found here.

yeah, but the default value is uneditable. you have to cast then promote, unless im missing something.

Interface would be fine.
You just have to work within the weapon blueprint directly.

The snippet you shared is literally just sending 0 and setting 0 because that’s what you sent - we assume.

Share more screen-shots.

Of what?

The system you currently have in place / whatever is broken and isn’t working.
As it is, short of reading your mind via the Interwebz there’s really no way to give you a solution…

2 Likes

That’s not answering what screenshots you need. I can’t help you help me if you don’t say what. My system IS broken, which is why I’m asking here how to fix it or replace it, which I’m fine with. I’m trying to learn UE4 (going on 4 months now) so I don’t know everything.

Please show us a screenshot of the visual cue, and how you are communicating with it. In this case, you might find it easier to use a component attached to the player Blueprint as a cue. Otherwise, I suggest that you download the Content Examples, as they demonstrate every method of Blueprint communication.

1 Like

Never mind actually. I made it work.