Announcement

Collapse
No announcement yet.

Simple Trigger box to blueprint bool?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Simple Trigger box to blueprint bool?

    Hi,

    I've been playing with the blueprint, and follow the tutorial on the class blueprint turning ON/OFF the light.

    Now I was trying to change it and have an external trigger (no BP) turn on the visibility of a light inside a BP (WallSconce)

    On the linked image you can see the wallsconce BP and the trigger. Goal is player going to the trigger turn ON the light.
    I might do that wrong but here is what I did so far :

    -Add the set visibility inside the construction script of the BP_WallSconce - controlled by variable called "ON/OFF"
    -On the level BP, add event OnActorBeginOverlap (TriggerBOX) set ON/OFF from the BP_WallSconce to Bool ON

    It trigger and I see in the level blueprint that it move, but not in the Wallsconce BP?

    I might do something wrong.

    Anybody has an idea to fix this or give me the correct direction to achieve this?
    I'm pretty sure I m doing something wrong.

    Thanks.

    https://www.dropbox.com/s/lg7hm88twv...rigger_web.jpg

    #2
    The problem is that the Construction Script only runs once when the Sconce Blueprint is placed. So your Level BP is correctly changing the bool, but just changing the bool is not doing anything to the light component. What you want to do instead is create a Custom Event in your Sconce BP called something like 'Enable Light', which you can trigger from the Level BP, just like calling any other function. I actually have an example of this here:

    http://youtu.be/s5pIrpI7py8
    Lead Programmer - UE4 Animation/Physics/Audio Team - Epic Games
    Twitter: @EpicJamesG

    Comment


      #3
      Hi James,

      thank you SO much!
      I must have missed this video. It works.

      Thanks again for the help!

      Comment

      Working...
      X