Can't create new reference of class inside another class

Hello,

I have a class oChild and oOrphanage with a variable ListOfChild typed oChild. So I tried to generate oChild inside the construction script of oOrphanage, I tried two method :

with “add child actor component”, but I have “oOrphanage_C_0.Child Actor Component_01” as type of the object that it return, so I try to cast in oChild to put in my listOfChild but it failed.

I also try with spawnActor, and I have this error message : “LogSpawn:Warning: SpawnActor failed because we are running a ConstructionScript (oChild_C)”

So my question, how can I get my child inside my orphanage ? The poor kid are freezing outside.

Nut sure what exactly you try to do, but you can try to use a Dispatcher, well I don’t know if it works in a construction script.

Ok, I find a solution, I just put the call function ta create kid inside the event graph. Just had to read the error message.