Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Int/Float Default Value Is Always 0


I've encountered this bug a few time already, and I couldn't find if it has been already reported. Some variables that I've just created in a blueprint have their default value equal to zero despite the fact that I've set another number in the Details Panel. I had this bug on two floot variables and one int variable already.

As you can see in the pictures, I have a variable that is printed in the begin play event (I can confirm it is not set by another blueprint beforehand) et the print return zero despite having the default value set to 5. The blueprint is compiled, and I've tried to build the game and restart UE4.18.0 but the only way to fix this is to delete the variable and make a new one from scratch.

I don't really know how to reproduce this issue. The first two times with the float variables I thought it was because I duplicated another variable to create them, but this time I believe that I made the int variable from scratch.

I'll update this post if I find how to reproduce the bug. If you could investigate despite the lack of hints it would be awesome!

Product Version: UE 4.18
more ▼

asked Oct 26 '17 at 01:52 PM in Bug Reports

avatar image

25 1 5 8

avatar image Thomas G ♦♦ STAFF Oct 27 '17 at 05:57 PM

Hello Sly,

We are unable to reproduce this issue on our end. I have a couple of questions to help investigate the issue you are experiencing further.

  1. Is this issue occurring in a C++ project or in a blueprint project?

  2. Is this issue only occurring in version 4.18 for you?

  3. In the screenshots you provided, the blueprint was compiled but not saved, does saving the blueprint correct this issue?

Please let us know if you are able to get a repro on this issue.


avatar image jimd667 Oct 27 '17 at 07:16 PM

Its a stretch but try deleting your Saved and Intermediate folders in your game project folder. It usually clears out any strange issues I have at times. more info here...


avatar image ChiggenWingz Dec 23 '18 at 06:55 AM

I am getting the exact issue described above

I just tried what you suggested but no change in behaviour.

Using 4.20.3 Project is blueprint based but have a C++ Character and Character Movement class.

Saving blue print does NOT fix the issue. Restarting the editor did NOT fix the issue.

Its like the variable isn't initialised correctly despite me setting the default values.

avatar image ChiggenWingz Dec 23 '18 at 07:08 AM

Actually I think I solved the issue, see submitted answer

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hello Sly,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.


more ▼

answered Nov 02 '17 at 12:42 PM

avatar image

Thomas G ♦♦ STAFF
7k 64 4 54

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Okie I think I found a solution to this possible symptom.

For context:-

  • My game is on 4.20.3

  • I am using blueprints, but have some C++ (not sure if this plays into the bug)

  • I have a parent character blueprint that I'm building a majority of my functionality and default variable values into

  • When my game starts I spawn in a character which is one of many child blueprints of the main parent blue print

  • The child blueprint does NOT seem to have the default values that were set in the parent blue print. They were all Zero

The variables that were resetting to zero in the child blueprints had been newly DUPLICATED through the editor and setup with default values after renaming them. (I had been doing this duplicating on the parent blue print, I had NOT been touching the child blueprint at all)

What I discovered when diving into my child blueprint; after I enabled the editor to show Inherited Variables; was that little yellow arrow icon next to the problem variables. For some reason my child blueprint was NOT using the default values.

I clicked the little yellow arrow icon through the entire child blueprint on the inherited values and the problem was fixed! :D

more ▼

answered Dec 23 '18 at 05:18 PM

avatar image

96 1 6 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question