# Defaults set in character blueprint do not override c++

**URL:** <https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824>\
**Category:** Blueprint\
**Tags:** default-value, unreal-engine, bug-report, CPP, Blueprint, question\
**Created:** [March 20, 2015, 5:55am UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824 "2015-03-20T05:55:23Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![2rusbekov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@2rusbekov](https://forums.unrealengine.com/u/2rusbekov)\
**Post date:** [March 20, 2015, 5:55am UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/1 "2015-03-20T05:55:23Z")

</div>

Blueprint doesnt overwrite default values of properties.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [March 20, 2015, 3:07pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/2 "2015-03-20T15:07:32Z")

</div>

Hey -

Are you not able to change a variable’s value in blueprints or are you referring to the default value being used in game instead of the blueprint value? Could you elaborate on your statement please?

Cheers

---

<div class="post-metadata">

**Author:** ![2rusbekov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@2rusbekov](https://forums.unrealengine.com/u/2rusbekov)\
**Post date:** [March 20, 2015, 4:05pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/3 "2015-03-20T16:05:51Z")

</div>

In game used value from c++ instead of blueprint value;

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [March 20, 2015, 4:36pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/4 "2015-03-20T16:36:07Z")

</div>

I’m still not sure what I understand what you’re seeing. I added a float variable in code and set it to 5.5 in the constructor. I then created a blueprint on this class and set the default value of the variable to 1.2 inside the blueprint. Adding a call to print the variable shows 1.2 in game. Could you explain how you’re setting up / changing the value of the variable?

---

<div class="post-metadata">

**Author:** ![2rusbekov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@2rusbekov](https://forums.unrealengine.com/u/2rusbekov)\
**Post date:** [March 21, 2015, 8:25am UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/5 "2015-03-21T08:25:41Z")

</div>

I made class child of Character. I created float vars BaseMoveSpeed and RunSpeed. I set them to 170 and 600 in constructor.  
Inside a blueprint in defaults tab I set BaseMoveSpeed to 250. In game variable is 170;

---

<div class="post-metadata">

**Author:** ![eXi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exi/32/906583_2.png) [@eXi](https://forums.unrealengine.com/u/eXi)\
**Post date:** [March 21, 2015, 12:27pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/6 "2015-03-21T12:27:27Z")

</div>

If this is a new and clean project, then it would be the easiest way to just upload this project and send it to (you can post a link here).

If not, please try to recreate this in a clean project and then upload it.

If you can’t recreate it in a new project, maybe upload the project where it happens.

This way can easier see what is going on. If you are not able to upload it, then it is ok too (: This would just help to speed things up.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [March 23, 2015, 9:04pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/7 "2015-03-23T21:04:35Z")

</div>

Hey -

The value not being updated in the blueprint seems to only affect blueprints who’s parent is a Character based class. Creating a code class based on Actor will display the correct value of a variable set in the blueprint. I have reported this bug (UE-12391) for further investigation. You can work around this by settin

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8f043ea0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8f043ea0](https://forums.unrealengine.com/u/anonymous_user_8f043ea0)\
**Post date:** [May 6, 2015, 6:16pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/8 "2015-05-06T18:16:38Z")

</div>

My team is experiencing this too on 4.7. We have a character BP class that inherits from a custom C++ character class that inherits from Character. The child blueprint classes of our character BP do not override a float value defined in the character BP root class. We have to set the overriding values programmatically with a function that triggers on each child class on Begin Play instead. We’ve noticed that the bug doesn’t occur when playing in editor – only when playing on packaged builds.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [May 7, 2015, 5:47pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/9 "2015-05-07T17:47:36Z")

</div>

Hey -

Just to make sure I am following your workflow you have a character code class which is the parent of a blueprint. That blueprint is then the parent of another child\_character blueprints? Is it in the child\_character that the values are not showing correctly? Where in the child\_character is the float value being set? Could you elaborate on your setup so that I can make sure I am following the same setup you’re using.

Cheers

---

<div class="post-metadata">

**Author:** ![MiDri](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MiDri](https://forums.unrealengine.com/u/MiDri)\
**Post date:** [December 3, 2015, 10:47pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/10 "2015-12-03T22:47:19Z")

</div>

I’m having this same issue with 4.10. FText used on a class that inherits from ACharacter. When child Blueprint class is made from my C++ class (which inherits from ACharacter) the data in the Blueprint class’ FText value is ignored and only what is set via C++ is shown.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [December 4, 2015, 4:19pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/11 "2015-12-04T16:19:48Z")

</div>

Hey MiDri-

Could you explain how your FText is setup in code? I tried adding an FText variable to a character class and after creating a blueprint from the class and setting the default value, the value set in the blueprint was printed to the screen.

---

<div class="post-metadata">

**Author:** ![UnexpectedSquirt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnexpectedSquirt](https://forums.unrealengine.com/u/UnexpectedSquirt)\
**Post date:** [April 11, 2016, 10:46am UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/12 "2016-04-11T10:46:45Z")

</div>

I’m on 4.11 and i’m experiencing a similar problem. I have a blueprint of a C++ class where I set a float value in the constructor and then override that value in the blueprint. In-game it appears to still use the default constructor value. Out of curiosity, is there a way to access the ‘blueprint default’ from C++ ? Something akin to Unrealscript’s : “default.MyValue” ? My current methodology is to just create an ‘initial’ version of the variable I want and then cache it in begin play and look it up when needed, but that seems really clunky.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 11, 2016, 12:26pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/13 "2016-04-11T12:26:11Z")

</div>

Hey AJQuick-

Are you using a character class/blueprint or is the class you’re using based on something else (actor, game mode, etc.)? Are you setting the blueprint value in the details panel, in the construction script or on the Begin Play node of the blueprint?

---

<div class="post-metadata">

**Author:** ![UnexpectedSquirt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnexpectedSquirt](https://forums.unrealengine.com/u/UnexpectedSquirt)\
**Post date:** [April 11, 2016, 2:14pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/14 "2016-04-11T14:14:14Z")

</div>

Hi

It’s a character subclass, yep. I’m setting the values in the details panel, not the construction script in the BP. Did a little digging and it looks like I can use GetClass()-\>GetDefaultObject()-\>SomeValue to pull the defaults I’m setting in the class constructor in C++, but I’m gonna go ahead and assume that won’t take into account any changes I make in the blueprint details panel 😛

---

<div class="post-metadata">

**Author:** ![UnexpectedSquirt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnexpectedSquirt](https://forums.unrealengine.com/u/UnexpectedSquirt)\
**Post date:** [April 11, 2016, 2:36pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/15 "2016-04-11T14:36:24Z")

</div>

I stand corrected. It does 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_948dbfa01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_948dbfa01](https://forums.unrealengine.com/u/anonymous_user_948dbfa01)\
**Post date:** [May 15, 2016, 6:30am UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/16 "2016-05-15T06:30:16Z")

</div>

Can you give any more detail on exactly how you got the value out of “GetClass()-\>GetDefaultObject()”?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_399165d6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_399165d6](https://forums.unrealengine.com/u/anonymous_user_399165d6)\
**Post date:** [November 9, 2016, 11:29pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/17 "2016-11-09T23:29:52Z")

</div>

Spencerkohan

In my experience you have to cast is after you get the default object.

```
UObject* Object = Class->GetDefaultObject();

AActor* ObjectWithVales = Cast<AActor>(Object);

```

---

<div class="post-metadata">

**Author:** ![Heerbann](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/heerbann/32/595151_2.png) [@Heerbann](https://forums.unrealengine.com/u/Heerbann)\
**Post date:** [June 19, 2017, 8:37pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/18 "2017-06-19T20:37:52Z")

</div>

I experience the same issue with a pawn that inherits from a c++ class. this class holds a (custom) component.  
everything works just fine and I can change the values of the component in the blueprint. however, when I hit play the base value from the constructor are used.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_07ba773b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_07ba773b](https://forums.unrealengine.com/u/anonymous_user_07ba773b)\
**Post date:** [September 21, 2017, 10:33pm UTC](https://forums.unrealengine.com/t/defaults-set-in-character-blueprint-do-not-override-c/311824/19 "2017-09-21T22:33:15Z")

</div>

I’m having this exact same problem.  
I have a default value set in my C++ constructor. The value is a UPROPERTY so can be changed in the Blueprint version of the class, but when playing the game the C++ default constructor just overrides any value I’ve made in the editor.
