How can I change variables in Blueprint Struct?

When Print String is triggered?

Hello there, I have a little problem on my game, I try to make a basic Player stats system (heath, checkpoint location …) using the new Blueprint’s Struct that new in 4.2.
I try to update a variable (health) in a Trigger Blueprint to the Struct to call a function in MyCharacter Blueprint. I try to make the health variable to 0 in the trigger but in mycharacter that return me 100 :/.

Here a screenshot :

I think that the variable is only update in the Trigger’s Blueprint and dont change the Struct itself … Any idea?

In both Blueprints the variable ‘Player Stats’ is public.

Thank, and again, sry for my bad English :slight_smile:

Its just a an Event Ticks who tell me the status of the variable (default value is 100 and i never change it exept in the trigger).

Hum, I do this to avoid Cast, it’s not possible to do this : Trigger >> Change the Struct >> Get the updated variables in My character ? I mean, I’ll use this variable in the future to create Checkpoints and SaveGame blueprint using this variable instead of CastTo …

Maybe Something like this would help you… let me know if so…i can explain more…

Buddy you got 2 Variables named the same in 2 different Blueprints. They are not the same! Independent of each other.

If you want to change the MyCharacters Variable you got to cast your actor from the Trigger Event to MyCharacter than pull a wire out of the refference and type set PlayerStats. Delete the Player Stats struct from your Trigger BP you dont need it there.

Also watch this :stuck_out_tongue_winking_eye: Blueprint Communications | Live Training | Unreal Engine - YouTube

Good Luck mate

I have this issue too. It seems like if I set members in struct or make struct and set like above in anything other than the player pawn(inputs) it gets ignored. Even though I’m using the same blueprint nodes.

For instance, I’m trying to keep track of how many of a particular blue print actor spawned in my scene. So I’m trying to add to a struct variable in the construction of that blue print actor and no update occurs.

I’ve been racking my brain on this one, any advice would be deeply appreciated! Thank you

… also why does a post from 2014 show up in the newest Questions x) I guess he figured it out by now on his own…

Make a new Post and attach some screenshots. His mistake is simply using 2 structs yours sounds a bit different.

Set Members In Struct From Pawn Only? - Programming & Scripting - Unreal Engine Forums. Any help will be appreciated.