Announcement

Collapse
No announcement yet.

change the colors used "Blueprint", but there is a problem how to put together to press only one.

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

    change the colors used "Blueprint", but there is a problem how to put together to press only one.

    Hello! I am made the creation of change colors using "Blueprint" then tested playing and clicking the mouse to change the colors now works well, but the problem is when I clicked the mouse selection one, and two together how to remove?
    i have uploaded files here:
    https://clck.ru/PwbEw - this is a project engine
    https://clck.ru/PwbFr - this is a short video examples so that you understand how you can solve the problem

    #2
    Hi man,
    Downloaded you prioject but cant load it.
    Posting screenshot is easier.

    By the way...
    look like you are using some kind of Toggle.
    clicking on a cube you , add the widget to the viewport, and clicking it again you dellete the widget.
    So the same action , active and deactive the colorchanging.

    there are more ways to fix it.

    store the references of your widgets and
    Before adding adding the widget
    Deactive all the other widgets

    Comment


      #3
      Originally posted by Est_engine View Post
      Hi man,
      Downloaded you prioject but cant load it.
      Posting screenshot is easier.

      By the way...
      look like you are using some kind of Toggle.
      clicking on a cube you , add the widget to the viewport, and clicking it again you dellete the widget.
      So the same action , active and deactive the colorchanging.

      there are more ways to fix it.

      store the references of your widgets and
      Before adding adding the widget
      Deactive all the other widgets

      Hello! Couldn't open a project? which engine version do you use? I use the 4.25 engine, today I again uploaded a short video via YouTube, and threw off 10 images for you to watch here if you know and can solve the problem. I will teach the engine a beginner)
      https://www.youtube.com/watch?v=vpZz...ature=youtu.be

      Comment


        #4
        Hi man,
        Pretty simple,

        You have to decide if you really need all these different widget .
        because you will have to manage all 3, hide them and show only the one you want , (i used a loop here)
        or You could just make 1 widget and change his text on runtime , and give him a reference to the actor you need to change color.

        Here a sample,
        ) - Making a text inside the widget and bind it to a variable string. (search online for how do it is really simple)
        )- with remove from parent you can "hide away" the widget.
        Click image for larger version  Name:	Widgets_manage 3 or set text and target to 1.jpg Views:	0 Size:	441.0 KB ID:	1795300

        Comment


          #5
          Originally posted by Est_engine View Post
          Hi man,
          Pretty simple,

          You have to decide if you really need all these different widget .
          because you will have to manage all 3, hide them and show only the one you want , (i used a loop here)
          or You could just make 1 widget and change his text on runtime , and give him a reference to the actor you need to change color.

          Here a sample,
          ) - Making a text inside the widget and bind it to a variable string. (search online for how do it is really simple)
          )- with remove from parent you can "hide away" the widget.
          Click image for larger version Name:	Widgets_manage 3 or set text and target to 1.jpg Views:	0 Size:	441.0 KB ID:	1795300
          Hello! Thanks for the help and advice! Yesterday I read your proposal, today I followed your image and made an engine, but the results are not obtained. Can you send me the engine project you made?
          I will be very grateful to you!

          Comment


            #6
            Hi man,

            follow me.
            Create a new widget. upper right you have 2 tab, graph and design.
            inside the "widget graph" create a variable of type String,
            Inside the "widdget design" add a text from the component on the left.
            Now select this text , in the detail on the right you will find the "content text" like in the image above, you have to click the button i have highlighted in green and choose "create binding"
            This will open another graph, with only 2 nodes , here drag and drop your variable string and connect it to the "return node"
            Click image for larger version

Name:	Schermata 2020-08-02 alle 10.38.49.png
Views:	58
Size:	72.4 KB
ID:	1795942
            Now setting the Widget variable string, will change what the widget will display on the text.

            Then you have to make custom events when you click the buttons on the widdget.
            This event work on a variable you have in the widdget of the right type, Staticmeshactor, actor, your-customactor...
            So when you click RED, he set the material for the mesh component, to any actor who is in the variable.
            If you dont set it, it will give you errors,
            So when you active the widget, set the text variable, and pass the actor / staticmesh actor / youractor to the widget too.

            Comment


              #7
              Originally posted by Est_engine View Post
              Hi man,

              follow me.
              Create a new widget. upper right you have 2 tab, graph and design.
              inside the "widget graph" create a variable of type String,
              Inside the "widdget design" add a text from the component on the left.
              Now select this text , in the detail on the right you will find the "content text" like in the image above, you have to click the button i have highlighted in green and choose "create binding"
              This will open another graph, with only 2 nodes , here drag and drop your variable string and connect it to the "return node"
              Click image for larger version

Name:	Schermata 2020-08-02 alle 10.38.49.png
Views:	58
Size:	72.4 KB
ID:	1795942
              Now setting the Widget variable string, will change what the widget will display on the text.

              Then you have to make custom events when you click the buttons on the widdget.
              This event work on a variable you have in the widdget of the right type, Staticmeshactor, actor, your-customactor...
              So when you click RED, he set the material for the mesh component, to any actor who is in the variable.
              If you dont set it, it will give you errors,
              So when you active the widget, set the text variable, and pass the actor / staticmesh actor / youractor to the widget too.
              Hello! today I tried to do it several times and followed closely, but, the results are not obtained
              project and video here:
              > https://youtu.be/Vm5k0DHB4Ps
              > https://drive.google.com/file/d/1vo4...ew?usp=sharing
              Attached Files

              Comment


                #8
                Hi man, koviop

                In your video:
                The add node, will add an Item into one array,
                Simple variable have a simbol , and array have another https://docs.unrealengine.com/en-US/...ays/index.html
                You are trying to plug the wrong kind of varyable, as you can see in my screenshot some days ago, nest to the 3W, my all_Widget is an array.

                at sec 23:
                you are trying to connect the "remove from parent" and the "cast to " to the loop.
                remove the Makearray, and remove the loop too,
                Using the link above, make your variable become an array, now drag her in the view and pin out and type loop.
                This will make a new clear loop for the variable,
                Sometimes the nodes of unreal remain faithful to the variable and type they are born with, and you have to detach all the pins and compile to "clean them."

                at sec 43:
                you are in the Binding graph, right there you have to put your own variable ,as you can see the return is empty, drag and drop a variable text or string and plug it in.
                This will make the widget constantly update the text to whatever you write in the variable..

                Click image for larger version

Name:	Widget_Set_TEXT_and_PassActor_to_ChangeMaterial2.jpg
Views:	38
Size:	530.2 KB
ID:	1797353

                Comment

                Working...
                X