Hi,
I’m having a bit of trouble dealing with STRUCTS. I’ve started a new project from the SideScroller template to make things easy to demonstrate my question/problem.
While playing I want to change the struct values depending on that I do. In this case walking over an actor and trigger a FlipFlop on a boolean struct value (unlocking/locking a weapon).
I have two structs:
-
struct_weapons- the parent, setting default values of the weapon here (changes of Set member-node should be committed here) -
struct_weapons_params- the child, only defining the parameters
And I have an Actor named trigger_unlocked that will trigger on Overlap, does a FlipFlop on the unlocked boolean I have in the struct_weapons struct. I’m using Set members-node to change the value (I have a variable called lib_weapons that type is struct_weapons.)
Now in my SideScrollerCharacter I have setup a basic input key E - to print the status of struct_weapons weapon. (Here I also have a variable called lib_weapons that type is struct_weapons.(
I play the game, press E and it prints the default value of lib_weapons: unlocked: false. When I move over the trigger actor it prints unlocked: true. But when I press the E key again it still prints unlocked: false (when it should be unlocked: true).
Am I missing something? I thought Set members-node should update the struct but it doesn’t.
I’ve added an album explaining everything in more detail: http://imgur.com/a/xJ7Z9#0
Character
actor overlap trigger
struct_weapons
struct_weapons_params
trigger actor activated and pressed E key to print unlocked status




