I have a peculiar question.
I am trying to implement Tank architecture where the Barrel has reference to the Projectile instead of Aiming Component having reference to Projectile.
The question is, is it possible to edit static variables in Blueprint.
Why would I need a static variable?
Well, the Aiming component needs a projectile speed to determine the trajectory of the projectile. The easiest way to do that is to declare a static variable that is accessible without instantiating the Projectile class and is equal for all tanks.
Why can’t you put the Projectile Speed value in the Aiming component like Ben does?
Well, I do not want to do that, what if I decide to use a different projectile and I want different properties for that projectile, e.g. Armour piercing, High Explosive, etc… It would be really inconvenient to have two variables to be mindful of, it is always better to have one place for variable definition.
Why do you want then, to change the variable value in Blueprint, if it is projectile type specific?
Well, what if the game designer wants to play with the value when he is creating a game. I don’t want the game designer to go to C++ code, or what if he doesn’t know to program. It is far easier to have the variable exposed in the Blueprint, so he could tweak it.
This is not necessary for this game, why do you bother?
Well, I am learning a lot about Unreal Engine through this course. I need this for my professional career. I work for the company that requires me to know Unreal Engine well, I might come across this issue during the development.
Thank you for your help in advance.
Keep on rocking guys.