Can't access boolean value from another actor component.
Hello. So I have 2 actor components on my first person character. On component1 I have various functions and variables. On component2 I wish to access the value of a Boolean on component1. I have tried this, but the value of the bool always stays false (the bool value is 100% changing):
I don't understand why this is not working because in the same component class if I call one of the functions from component1 everything works fine:
Now I could get around this by having a bool on myCharacter that changes everytime the one on component1 does, then read this from component2, but I'd prefer not too and keep everything organised. Also this is just really bugging me! Thanks to anyone that can help!
asked Feb 16 '17 at 10:29 PM in C++ Programming
Never mind I was just being really stupid. Turns out I have 2 variables in my component1 that are called wallRunning and isWallRunning for some reason. The isWallRunning was never used in the class so when I was ready the value it was true that it was always false.
answered Feb 16 '17 at 10:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here