Call mesh components of blueprint in level blueprint

Hi, I’m struggling to call on my blueprint variables in my Level blueprint. Basically as you can see by the graphs there are two objects changed by “e” (Bottle colour and label Colour), but I want to have them enabled by a trigger volume, but I can’t seem to reference them for change in the level blueprint.

The event begin play is to allow player input inside the blueprint, could a trigger box be used here instead of event begin play? that would also sort out my problem I would imagine.

Thanks

53016-untitled-1.jpg

Yes, using a box collision component (Trigger box?) you could use an OnComponentBeginOverlap. This could all be done within your blueprint rather than using the Level Blueprint. See the Wiki tutorial on opening and closing doors for a blow by blow on how to build the triggerbox and get it’s events, though it’s pretty much just doing an add component and using the event.

To use the Level Blueprint and access the other blueprints variables, you would have to “Cast To” that blueprint’s class and can then access any public variable the other blueprint makes available. The first way is easier IMO.

Sorry if I’ve misunderstood your question.

I don’t want to add the trigger volume into my blueprint becasue I have multiple objects wanting to use one and having 4 or 5 of them will be messy, and they will all have slightly offset trigger volumes which I want to avoid, I can’t find any way of either referencing the meshes inside of the bottle blueprint in the level, or referencing the trigger volume inside of the bottle blueprint.

Thanks

I do have a blueprint with multiple triggers and you can get the unique events for each, but I understand you don’t want to do it that way.

As mentioned above, in the level blueprint, if you use the Cast To, you should be able to access public variables from the regular Blueprint. Variables can contain references by dragging the reference from the mesh into the blueprint, then promoting to variable. Then in your level blueprint, do a Cast To and select that blueprint. Then when you drag off of the “As” pin (blue), your variable name will appear for Set and Get.

This may be the opposite of what you want since the trigger would still be in the blueprint, only the logic for them would be in the Level Blueprint. It sounds like you want the events to trigger in the LB, and have the logic in the regular Blueprint. Some combination of the signaling through variables might be doable with these tools though. I usually find that the cleaner solution involves putting as much in the regular blueprint as possible.

Hopefully someone will have an exact solution to do it your way. If not, the other will work.

A correct to my second paragraph. You don’t even need to drag a ref and promote, your mesh will already appear in the list for get and set.

Thanks for this, I’ll take a look at it later. Yeah I want the events to trigger in the LB because there are around 5 or 6 bottles that I want to change the colour of, but if the trigger box is contained in the bottle blueprint it will also be copied and then it wont line up with the others and some of the bottles will trigger before others.

Thanks