Can't modify variable in child BP

Hi.

I following this neat tutorial and I created a base class call BPBaseWeapon. The child class is called BPC_InstantHitWeapon. My issue is that I created some variables in the base class but when I try to modify them in the child, its greyed out. Please see screen shot.

Any insights into the why its greyed out is appreciated. By the way, the person doing the youtube video can edit the child class just fine.

alt text

Thanks!

I should have been more clear… I do not want to change the type, just the content of the variable. For example, the AMMO variable is 0 and I want to set to 50.

You can not change the type of variable present in your base class from your child class as there is possibility that this base class is inherited by its many other children who are using the same variable. If you make changes to the base class variable in your child, it will be having its consequences in all other children. So this is greyed out in your child class.

In your child, you can use “SET Ammo” node to change its value on some event eg on BeginPlay. You cannot change the default behaviour of your parent class variable as it may affect other children.

can you give video link. Maybe I have understood your query wrong.

Okay. In version 4.8 we are able to change default value in child BP and it is just setting this value for current child which is fine. But in version 4.9 this is greyed out.

I understand, thank you. Not sure why its working on the youtube video. He just went into the DEFAULT VALUE for the AMMO variable and changed it to 50. Nodes are easy enough…

Go to the 25th minute…

That explains it! Just setup some nodes and we’re good. Thanks for taking the time to review… Have a great nite!

Please mark this accepted as it may help someone later.

Indeed it did! For easy reference, the inherit option is under the eye icon at the top right of the variables list.