Announcement

Collapse
No announcement yet.

Bleuprint copy problem

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

    Bleuprint copy problem

    Good morning everyone,

    I encounter a problem with a Bleuptint which is linked to a Widget whose buttons allow the control of actions programmed in the Bleuprint. When I put an asset in the scene everything goes smoothly, if I put a copy of that asset it does not work.

    What’s wrong with my construction?

    Bleuprint
    Click image for larger version  Name:	BP_Fleure Rouge.jpg Views:	50 Size:	240.9 KB ID:	1806782
    Widget
    Click image for larger version  Name:	Recolte Fleure rouge.jpg Views:	44 Size:	228.8 KB ID:	1806783

    Thank you in advance for your answers
    Last edited by Phylogenius; 09-03-2020, 08:48 AM.

    #2
    Originally posted by Phylogenius View Post
    Good morning everyone,

    I encounter a problem with a Bleuptint which is linked to a Widget whose buttons allow the control of actions programmed in the Bleuprint. When I put an asset in the scene everything goes smoothly, if I put a copy of that asset it does not work.

    What’s wrong with my construction?

    Bleuprint
    Click image for larger version

Name:	BP_Fleure Rouge.jpg
Views:	122
Size:	240.9 KB
ID:	1806782
    Widget
    Click image for larger version

Name:	Recolte Fleure rouge.jpg
Views:	106
Size:	228.8 KB
ID:	1806783

    Thank you in advance for your answers
    Is it because your widget does this:

    Click image for larger version

Name:	this.JPG
Views:	97
Size:	9.8 KB
ID:	1806790

    and when you have two copies of the widget, it doesn't now which one to get...

    Comment


      #3
      How to fix it ?

      Comment


        #4
        Originally posted by Phylogenius View Post
        How to fix it ?
        It's not pretty. You have use event dispatchers.

        Click image for larger version  Name:	my blueprint.JPG Views:	0 Size:	112.4 KB ID:	1806874

        Click image for larger version  Name:	inside widget.JPG Views:	0 Size:	96.7 KB ID:	1806875

        You can pass parameter through them.

        So it's possible, but what you're basically experiencing, is that it's not expected.

        I think part of the problem is that some of the logic that should stay in the blueprint is making it down to the widget. What exactly are you trying to do?

        Sorry, ignore that - you said ( thinking... )

        So, doesn't it make more sense to have one widget that will talk to all of these blueprints? I mean, even if you got this working, the widgets would be on top of each other on the screen.

        I would say, have one widget which gets a list of all the blueprints and you can choose which one to interact with. Or put the widget IN the blueprint. You can do it as a component, it's a bit like those floating health bars you see on multiplayer...

        https://www.youtube.com/watch?v=eNQmhtJ7CXI
        Last edited by ClockworkOcean; 08-31-2020, 03:19 PM.

        Comment


          #5
          @ ClockworkOcean : Thank you for taking your time to answer me. As a beginner, I have trouble understanding your reasoning.

          What I want to do is use the pending bleuprint and multiply it so that my character can harvest fruit on several plants of the same species.



          Comment


            #6
            Originally posted by Phylogenius View Post
            @ ClockworkOcean : Thank you for taking your time to answer me. As a beginner, I have trouble understanding your reasoning.

            What I want to do is use the pending bleuprint and multiply it so that my character can harvest fruit on several plants of the same species.


            I'm with you...

            Ok, so a number of 'trees' in the level. Each is a BP. Walk up to one and click it ( maybe ) and a widget appears saying 'harvest fruit?'

            Give each BP an ID. It's just an integer which you can assign in the editor. When you walk up to a tree and click, it calls the BP, but leave a copy of it's ID in the game instance. The widget can look in the game instance and know which BP has been clicked.

            The game instance is one of these things you'll hear about all the time, along with player controller, game mode, game state blah blah blah...

            Basically the game instance is a BP setup by the system when your game starts running, it's always there in the background and accessible from everywhere:

            https://www.youtube.com/watch?v=5w594D3qtLs

            So do this:

            1) Make a game instance and put a variable in it, just an int called ID. ( compile, save )

            2) In your BP ( the tree ), you can say:

            Click image for larger version  Name:	TreeBP.JPG Views:	0 Size:	99.9 KB ID:	1806928

            3) In the widget:

            Click image for larger version  Name:	widget.JPG Views:	0 Size:	113.7 KB ID:	1806929

            It might look like a bit much, but it's not really. Watch the vid, see how it goes...



            Comment


              #7
              Hello Clockwork Ocean, all
              That’s where I’m at, I don’t think I’ve got the knots right, because it doesn’t work.
              The Widget no longer appears on the screen.

              Bleuprint
              Click image for larger version

Name:	BP_Fleure Rouge + ID.jpg
Views:	73
Size:	86.7 KB
ID:	1807124

              Widget
              Click image for larger version

Name:	Recolte Fleure rouge + ID.jpg
Views:	87
Size:	102.3 KB
ID:	1807123
              Last edited by Phylogenius; 09-01-2020, 09:18 AM.

              Comment


                #8
                Originally posted by Phylogenius View Post
                Hello Clockwork Ocean, all
                That’s where I’m at, I don’t think I’ve got the knots right, because it doesn’t work.
                The Widget no longer appears on the screen.

                Bleuprint
                Click image for larger version  Name:	BP_Fleure Rouge + ID.jpg Views:	0 Size:	86.7 KB ID:	1807124

                Widget
                Click image for larger version  Name:	Recolte Fleure rouge + ID.jpg Views:	0 Size:	102.3 KB ID:	1807123
                I've made a working version.

                First off, apologies, ONE thing I forgot to tell you. You have to tell the project to use your game instance in the settings:

                Click image for larger version  Name:	GI.JPG Views:	0 Size:	118.8 KB ID:	1807259

                So this is the blueprint:

                Click image for larger version  Name:	MyBP.JPG Views:	0 Size:	253.2 KB ID:	1807260

                and the widget:

                Click image for larger version  Name:	widget.JPG Views:	0 Size:	114.0 KB ID:	1807261

                I put two in the level ( excuse the appauling GIF, you can't upload anything here ):

                Click image for larger version  Name:	ezgif.com-optimize.gif Views:	0 Size:	199.3 KB ID:	1807263

                If you need more info, please quote me, otherwise I don't get a notification...

                Also, the cube has this:

                Click image for larger version

Name:	rand mat.JPG
Views:	98
Size:	195.5 KB
ID:	1807266
                Last edited by ClockworkOcean; 09-01-2020, 03:48 PM.

                Comment


                  #9
                  Originally posted by ClockworkOcean View Post

                  If you need more info, please quote me, otherwise I don't get a notification...
                  In order to understand the functionality of your schema, I took the liberty of disassembling the part "instance". Surprise its works also without. I probably missed a step! With the part "instance" all the cubes change color at the same time.

                  A solution?

                  A question: what is the "Cast To Pawn" for?
                  With or without, I also got the same result.
                  Last edited by Phylogenius; 09-03-2020, 03:14 AM.

                  Comment


                    #10
                    Originally posted by Phylogenius View Post

                    In order to understand the functionality of your schema, I took the liberty of disassembling the part "instance". Surprise its works also without. I probably missed a step! With the part "instance" all the cubes change color at the same time.

                    A solution?
                    If they all change color at the same time, you probably have the widget code wrong

                    Comment


                      #11
                      Originally posted by ClockworkOcean View Post

                      If they all change color at the same time, you probably have the widget code wrong

                      Perhaps you see or hide the error... ?

                      Click image for larger version  Name:	instance Widget.jpg Views:	0 Size:	125.1 KB ID:	1807706

                      Click image for larger version  Name:	instance Cube.jpg Views:	0 Size:	333.7 KB ID:	1807707
                      Last edited by Phylogenius; 09-03-2020, 04:07 AM.

                      Comment


                        #12
                        Originally posted by Phylogenius View Post


                        Perhaps you see or hide the error... ?

                        Click image for larger version Name:	instance Widget.jpg Views:	0 Size:	125.1 KB ID:	1807706

                        Click image for larger version Name:	instance Cube.jpg Views:	0 Size:	333.7 KB ID:	1807707
                        When you put the cubes in the level, you have to set the ID differently for each one!

                        ( that's how the GI can tell them apart... )

                        Click image for larger version

Name:	id.JPG
Views:	77
Size:	119.0 KB
ID:	1807719
                        Last edited by ClockworkOcean; 09-03-2020, 05:56 AM.

                        Comment


                          #13
                          Thank you so much, for your patience and kindness shared your knowledge.
                          My problem is solved !
                          May God bless you.

                          Comment


                            #14
                            Originally posted by Phylogenius View Post
                            Thank you so much, for your patience and kindness shared your knowledge.
                            My problem is solved !
                            May God bless you.
                            Ha! Great

                            Comment


                              #15
                              Originally posted by ClockworkOcean View Post

                              Ha! Great
                              Hello Clockwork Ocean,

                              I come back to this subject because an error occurs when I add an "Event", the actor is no longer indexed. I tried to place this "Event" in several different places and yet no conclusive result, although we took their place correctly.

                              Where can the problem come from?

                              Thank you in advance for your replies

                              Click image for larger version

Name:	BP fleur nbr visite.jpg
Views:	64
Size:	36.4 KB
ID:	1811970

                              Click image for larger version

Name:	Recolte Nbr visite 1.jpg
Views:	48
Size:	80.3 KB
ID:	1811971

                              Click image for larger version

Name:	Recolte Nbr visite 2.jpg
Views:	49
Size:	45.5 KB
ID:	1811972

                              Comment

                              Working...
                              X