child actor component change variables

I can’t make changes to a child object variable. Can someone tell me how to do this?
I make a cast in the construction script and enter a new value, but nothing happens. Both in the editor and after starting the game (

I don’t think you can. The Football Actor does not really exist as a PIE actor until The Stadium initialises the Child Actor Component which will only then spawn the Football.

This will work run-time on Begin Play, sure. Just not in the editor and probably not very well or at all in the CS. Wish CACs were smarter.

The bit you’ve highlighted in Red is just the Template - in C++ you can get both the ChildActor and the ChildActorTemplate but I haven’t seen anyway to access that template from Blueprint.

From my experiments, the ChildActor is constructed (with those defaults from the template) before you get to the ConstructionScript.

If you do a printstring on the BP_Football LinesCount before changing it to 0, it should be 22 - if you do a printstring after setting it to 0 (or in the PlayEvent) it should be 0.

I am a bit confused; if I do this:

With no Begin Play or Construction Script, the value of the Child Actor changes correctly. I’m doing it in 4.27. Is this not working in UE5?

This also works if you assign the value on Begin Play. But… The CAC will initialise the debugChild from the template, with defaults. The int will be 0 initially, only to be set by the owner’s (debug) Begin Play after the debug child is instantiated:

If this is done in the CS:

It also works (which I did not know about until now since it did not before 4.22 or thereabout)

In the last case, the CAC’s actor actually spawns with 22.

If the above does not work in UE5 - it’s either a bug or the new feature.

What I would really like the CACs to do in BP is to give me an instance of the template here:


There is a great post somewhere in the Knowledge Database on the way the CAC’s are used in Fortnite - they were supposed to be developed further but it never happened.

I use UE 5.1. If you specify the actor directly, then I can also change these settings in the template from the right, but I need to change this value in the blueprints constructor via blueprints. There’s no way I can do that(

I tried to specify the actor directly and nothing worked the same way. At the start of the game, nothing changes in either case.

Fleshed out my post in case you missed the edit.

a great post somewhere in the Knowledge Database

Not as great as I remember it ;p

Check the snapshots I’ve put in my first answer. You CAN change those settings in your Construction Script.

He still doesn’t want to change anything. I’m trying to set the color black and nothing happens. Most likely this is a UE5 bug. I tried to upgrade to 5.1, but Epic Games broke the banal migrate and it doesn’t work now. By the way, LOD’s in UE5 are also broken. I made a post on this issue, but no one has answered me yet UE5 LOD bug on skeletal mesh

How are you testing it? What does “nothing happens” mean? How, and to what, is that colour applied?

It won’t change in your ActorTemplate - that is a separate object that is only used to construct the actual child - it changes it in the actual child actor - I have tested this in 5.1 and it works.

If you check the color from a “ChildActor” node, it should be correct.

1 Like

Wait, wait, wait. are you expecting this value to change:

Here in the panel? That will not work.

Yes. I am trying to change these parameters. These are the settings of “an actor inside another actor” How can I do this? If I go to another actor directly, these parameters will be available in the Settings panel I created. But as soon as I add this boat as a child to another actor, these settings become inaccessible for simple editing and even through blueprints I can’t change them in any way ((

Yes, I understand that it will not be possible to change these parameters now. I took this screenshot to make it clear what I want to change at all. How can I influence these parameters? What’s the secret?))

There is no secret. You either punch in the value in the field manually or use Construction Script. This works in 4.27, and now we know it also works in UE5.

Perhaps the issue is in the testing methodology and your expectations. Could you please demonstrate how the variable is not changed in the child actor? I’ll repeat my question:

How are you testing it?

If we can’t replicate the exact issue you’re having, we can’t help.

I will try to describe what I want to do and maybe you can help me. Imagine that you have BP_house (parent Actor) and it has a parameter (open or close the door). Let’s say this is a Boolean variable available for configuration. It opens and closes the doors of your home through the construction script. You can place this actor at your level and the level designer can adjust this variable as he likes. Now let’s create another BP_id (parent Actor) and by analogy it will have a Boolean variable that is responsible for the lowered bucket or the raised one. There can be a lot of very different such objects. And now the most interesting thing. We create 1 more BP_entourage (parent Actor). In it, we implement logic through a construction script where we can select any of our BP created above and change their settings (raise or lower the bucket - if it’s a well, open or close the door - if it’s a house, etc.) One by one in these BP actors, these settings are visible on the tab from the right, but when we if we add these settings to our BP_entourage, then there are no more settings and the level designer cannot configure them. All he can do is choose only the actor that he wants, and he will not be able to set up this actor. It is necessary to search for this BP in the editor and change its settings by silence, but then all such actors on the world map will immediately change their appearance. I hope you understand what I want to do.))

This is the exact wish I described here, the very last image:

Child Actor Components do not support the behaviour, rendering them useless in such cases.

A workaround is to give the component owning actor an Instance Editable variable and push its value into the CAC’s actor through the CS. If that does not work, you may need an Editor Callable custom event and run the script from there.

1 Like

Yes. It looks like I’ll have to abandon this idea, or try to do it through events as you said. Or through the interfaces, you can also try.

A Quick and Dirty way of doing it would be to add those properties to the Parent actor, and pass them through to the child actor in the Construction Script, but if you’ve got a lot of different types of child actors you want to add, it could get bloated.

Another option could be, rather than use ChildActorComponents, you could create new actors in the scene and just “Attach” them to the parent by dragging the child onto the parent in the World Outliner - you can still select them in the editor then and change their properties.

You can Spawn those Attached actors from a Blueprint too, but you’re in charge of making sure you don’t go creating new versions without destroying the old ones - and you can’t spawn them from the Construction Script.

I have to admit I’m almost at the point of releasing a new plugin that has Managers built in for automatically handling ChildActors, AttachedActors and Instanced Static Meshes - a good solution for your situation would be to use the Managed AttachedActors - they could be created in your Blueprint from the Construction Script, and you can select and edit their properties from the world, but I’m still a week or so away from releasing it.