x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

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!

Product Version: UE 4.21
Tags:
more ▼

asked Mar 13 '19 at 03:19 PM in Blueprint Scripting

avatar image

AndySonOfBob
1 1

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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...

more ▼

answered Mar 13 '19 at 03:37 PM

avatar image

ClockworkOcean
115 3 1 2

avatar image AndySonOfBob 6 days ago

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!

(comments are locked)
10|2000 characters needed characters left

alt textLook 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.

box-bp.png (365.0 kB)
pointlight-bp.png (59.0 kB)
more ▼

answered Mar 15 '19 at 02:11 PM

avatar image

ClockworkOcean
115 3 1 2

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question