Announcement

Collapse
No announcement yet.

light control blueprint issue

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

    light control blueprint issue

    Hi! I created a light blueprint included a lamp object and a point light. Then I created a billboard blueprint as a light switch. In billboard blueprint, I created a Actor variable for object reference for Cast to the lamp blueprint.
    after all, event I switch the light on or off, the light still on. Please help!!!!
    Click image for larger version

Name:	billboard.png
Views:	1
Size:	149.3 KB
ID:	1168717

    #2
    Where are you storing the 'Night Time' boolean variable? Have you tried the same node setup in a function within the lamp, to make sure that your 'Set Intensity' nodes are correctly targeting the light?
    My current question - Getting variables from unspawned actorcomponent

    Our game - Robots Minerals Profit! - a side-on builder game with cooperative multiplayer, made in UE4.

    Comment


      #3
      Night Time variable is set in BillBoard blueprint. The reason I use Billboard blueprint cuz there are many lights and other setting needs to be change when switching between day time and night time. So I want one button to do all the works.

      Comment


        #4
        If I put the codes in the lamps' blueprint like this. Then put the billboard blueprint into the scene. Will it works?
        Click image for larger version

Name:	billboard2.png
Views:	1
Size:	212.6 KB
ID:	1097146

        Comment


          #5
          What's your light's mode?

          Static or moveable?

          Comment


            #6
            static static

            Comment


              #7
              can someone show me how the codes should looks like, especially about object reference? Because I'm guessing the problem object reference is the problem.

              Comment


                #8
                Even I try this is not working at all. How to call a blueprint from another blueprint like this?
                Click image for larger version

Name:	billboard3.png
Views:	1
Size:	185.2 KB
ID:	1097244

                Comment


                  #9
                  Is there anything in your Object R? If you just create a variable that is type of other blueprint the variable is "empty" just a hollow shell. You need to fill it with actor.

                  If you want to call blueprint from another blueprint you can use "get all actors of class" and then loop the actors and use variable or something so you know you got the right actor. After that you can do what ever you like with the actors variables or actor itself.

                  You can use this method if both of your actors are placed in game: Go to your first blueprint and create a variable that is a type of the other blueprint. Then you set that variable to be public. After that you go to your main view, click the first actor and in the right side where all the settings are you select the variable you just made public, press the pipet tool and press the other actor. Now when you are in the blueprint you can get the variable and you can do what ever you want with the variables that specific blueprint have.

                  Comment


                    #10
                    You should change ligt mode to 'Moveable'.

                    I tried and it works.

                    Comment


                      #11
                      yes! Thank you guys! The "Get all actors of class" works. But one quick question. I'm setting this in Construction Script for beginning b4 the game start, why doesn't work for static light, have to use stationary or movable light?
                      Click image for larger version

Name:	billboard4.png
Views:	1
Size:	96.6 KB
ID:	1097284

                      Comment


                        #12
                        Because,

                        Static ligts are works with ligtmaps.

                        Lightmaps can't change in real time.

                        Comment

                        Working...
                        X