Download

Change the activated emitter for a child blueprint?

Is it possible to change the activated emitter for a child blueprint? It seams none of the properties are available when making a child of a blueprint. Specifically I am adding a point light to standing and wall torches. This all works fine, but it means I have to create a copy of the standing torch and wall torch. Ideally I’d want to inherit from the originals and only change the emitter. I tried changing it via a blueprint, but it seams to simply add a second emitter on top of the original which doesn’t work. Would it be possible to modify the existing emitter and dynamically add the point light on the begin event?

For those interested my mod is below. You can see the huge difference a point light makes. I also tried particle lights, but they’re terrible (performance and look due to lack of proper light collision).

Reparent your item to itself In Blueprint Poperties. Delete any unwanted emitters. Add your own emitter.

Yes, but then it loses its parent. The entire point was to only replace what had to be replaced and the remaining would inherit from its parent. In the case of the standing torch it would inherit everything except the activated emitter, but it won’t let me replace that component for a child.

Then what you are wanting to do is modify the parent itself and replace the emitter there, and make it a non-clean mod.

No, I don’t want to modify the parent. I want to override just the emitter of the parent with a child. I can do this for several aspects of the blueprint expect for the components. I guess it’s just a UE4 limitation that’s preventing me from doing this.

Edit: Yup, looks like a limitation of the engine. I maybe able to do this in the construction script though; will see.

Yes, it is a limitation of the editor. I have had to graph out several things with Event begin play -> delay 0.1 -> whatever you need to override.

Another thing I have done, is to copy the parent to my folder, reparent my new item to my new copied parent, and change the new parent.

That might work. I tried changing it in the constructor, but that didn’t seam to work. When I tried it in an event graph I ended up with 2 activated emitters somehow, but never tried with a delay.

Yeah, but then you’re in the same situation of the parent potentially being out of date. For example the standing torch could get new fuel sources added and if I child it my mod will automatically work with them. If I just copy it then it won’t inherit those changes and I’ll have to make a new release for a simple fuel source.

I think you can remove a inherited component as well from the graphs.

Ok, I can’t seam to replace the emitter as it’s in “Child Actor Class”, which has no set functionality (only get). Guess I’ll need to just continue with my copy usage unless anyone has any other ideas.

Yeah, I can destroy it, but since I can’t set “Child Actor Class”. So it doesn’t seam to want to toggle mine. The emitter is attached to Standing Torch > Activated Emitter > Child Actor Class.

Ok, I understand how to set the activated emitter now, but it still doesn’t want to use it. I’ve Constructor > Add Child Component (my new emitter) > Set Activated Emitter. I see the child component added, but doesn’t use it and the existing emitter is still there (which I can remove by destroying it, but still mine is not used).

I think you are at a limitation of the editor here.

I know I can change it for a copy. My copy has already done that. The issue is you can’t change that for a child. I want to child the standing torch then override its emitter. You can’t due to a limitation in UE4, but it can be done at the constructor; however, the code seams to just ignore it and never toggles that emitter on.

Ok, think I figured out a better way to do this. In the constructor I get the emitter then simply add a point light component to it. As that’s all I need to change in the emitter this should work fine. I can now just use a child of the standing torch to allow proper inheritance of any standing torch changes made in later patches.

Edit: Well it kinda works. The light attaches, but doesn’t seam to work the same as if it was initially on the emitter. Very strange.

For future reference, I have noticed when overriding inherited values and using event begin play, you need a delay directly after as well. So if you are using event being play, be sure to add your delay!

event begin play->delay->

I got it figured out. Embarrassingly enough I left inverse square on, lol. So the light wasn’t matching what my previous usage was. It’s all fixed now. I’m adding the light directly in the constructor.