How do I get my TriggerBox BP to control my LightToggle BP?

Make a variable of type lighttoggle in the triggerbox BP, click the eye ( to make it visible in the world outliner ).

COMPILE.

Then go to the world outliner ( editor ), when you click the triggerbox you’ll see the variable in the details panel, you can select the togglelight as the actual instance it’s pointing to.

Then, in the triggerbox BP, drag the lighttoggle variable into the BP, you can drag a pin from it and you’ll find your ‘on’ event from the light BP.

That’s how you do it…

Hi

I have three BluePrints:

  1. TriggerBox_BP - a static mesh (for a platform) and collision box
  2. LightToggle_BP - a collection of point lights
  3. FirstPersonCharacter - the starter content FirstPersonCharacter

I want my TriggerBox_BP, when triggered by the FirstPersonCharacter, to tell the LightToggle_BP to toggle the point lights.

How do I get my BPs to communicate?

Thanks!

Thanks!

I can’t seem to get it to work though. Not sure where I am going wrong…
Here is what is inside the BPs - they are essentially empty:

  • LightToggle_BP: CustomerEvent → ToggleActive (pointlights)
  • TriggerBox_BP: OnComponentBeginOverlap(Box) → Cast to FirstPersonCharacter

This is pretty much what I did:

  1. I created a variable in the TriggerBox_BP. I wasn’t sure what type to set the variable to. Would that be Object Type? If so I searched for light toggle and I found something that looked like the LightToggle_BP but UE4 had added spaces? In the end, I tried both class and instance.
  2. In the editor, clicking on the TriggerBox instance, I set each of the two defaults (?) to the LightToggle reference which was available in the dropdown menu. (I have also tried using just class or just instance variable types.)
  3. When back in the TriggerBox_BP I dragged in the variable and I couldn’t find the custom event from the LightToggle_BP

Any ideas what I am doing wrong here?

Thanks and soz for being a numpty!

271483-pointlight-bp.png

Look at the pics.

Point light just toggles on and off.

Box has a variable of type ‘pointlight BP’ ( or whatever you have called your BP ).

You need to set the variable from the editor ( in the world view ) otherwise it wont work.