Correct way to implement Blueprint and C++ Classes

Simple question: is it correct/appropriate to implement a C++ class, create a Blueprint out of it and change relevant variables from the Blueprint?

I give an example to make myself clearer: let’s say I have a boolean variable instantiated in my C++ class (like “isSprinting”) and if it’s set to true then a certain action is done every tick.
Would it be bad programming to modify the “isSprinting” variable from the Blueprint class?
I ask this because from what I’ve learnt at Uni, this would be usually considered some sort of bad programming (like having a method related to a class and modify a crucial variable related to said method from another class).

Part of the fun in UE4 is exposing variables from C++ with BP’s… This allows non-techy people to easily modify the game to suite their needs. Check out this page for additional details: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

So, let’s say you would want to expose a variable bIsSprinting it would be:

UPROPERTY (EditAnywhere, BlueprintReadWrite, Category = “Character|Sprinting”)
bool bIsSprinting;

This will allow a person in BP to access this variable when you RIGHT CLICK on the BP Graph. It will be in the section, CHARACTER → Sprinting. (Get and a set will appear)

Hope this helps.

Ack, the formatting is odd. the bool bIsSprinting should be below the UPROPERTY.

Thanks, just wanted to be sure I was not making some sort of awful logic mistake :wink: