I cant get float from another blueprint

When i print variable in main BP, i can get float output(-1 , 0, +1). But while i cast that BP and print in another BP, it always gives me default value. Does anybody know why?

I’m just trying to wrap my head around this - so in the second character BP where you’re accessing the variable - is that a PlayerCharacter? If so, wouldn’t that be the character that accepts input so the other character Would always be 0?

1 Like

Third Person Character on the screen is just a pawn. My controller and character is “Endless Character BP”. I want to control more than one pawns with my input. My input events are working perfectly there in Endless Character BP but when i put these values in a variable and try to call it from another BP, it gives me 0. Actually, it gives me default value. If default value would be 10, it would print 10. And i dont think so problem is about input because im using inputs on Character BP. Im just trying to call these values. (And i would like to say there is no problem about character doesnt move, im just talking about prints, im pressing A and D but it is still zero.)

1 Like

I don’t understand your video but I’ve notice that the blueprint that is set to receive inputs will “eat” the inputs and they will not be received by other blueprints. don’t know if true or something I’ve misunderstood

Oh, so you are saying i cant give my input values to another blueprints, right? I want to ask one more thing, is there another way to control 2 pawns with input? Because i am trying to put few Third Person Characters on level and control all of them with input which comes from Character/Controller BP.

No, you should be able to pass that info. Make sure you set the variable as public, or create an accessor function.

Also, look at the outliner when you start PIE session, you have 2 characters (one of them spawn in based on your gamemode I’m assuming). This may be causing conflicts or maybe not referencing the correct one? Rather than getactorofclass, you may want to explicitly assign the reference in the editor or on beginplay.

1 Like

Do you want to control multiple characters at the same time or switch from one to another?

1 Like

I want to control multiple characters at the same time.

1 Like

In the game mode, i set my pawn as “Endless Character BP”. It doesnt have a mesh or anything, it is just on level and takes inputs. I put one Third Person Character on level and there is just one. I set the camera at begin play as Third Person Character’s camera.