Announcement

Collapse
No announcement yet.

Object With Interaction

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

    Object With Interaction

    Hello, I just created widget where I want that to show when I press E keyboard button.
    I did everything but nothing was working for me. So I am here for asking you.
    Click image for larger version

Name:	bluepringobject.jpg
Views:	1
Size:	696.2 KB
ID:	1217312

    #2
    several things to consider... but first is you shouldnt call visibility until after widget is created.....
    https://www.casualdistractiongames.com

    Comment


      #3
      [MENTION=766259]Dev.Designx[/MENTION]

      1) Create a widget somewhere. For example at begin play event.
      2) Put it to variable.
      3) Use this variable as a target of set visibility.

      This should work for you instead of creating new widget every push and release)
      Available for contract hiring! Complex mechanics, quick game prototyping, VR, AI, Animation, Tools for designers.

      Check out my latest game! Last Joy - 2D RPG with unique combat system.

      Comment


        #4
        Originally posted by Two-faced View Post
        [MENTION=766259]Dev.Designx[/MENTION]

        1) Create a widget somewhere. For example at begin play event.
        2) Put it to variable.
        3) Use this variable as a target of set visibility.

        This should work for you instead of creating new widget every push and release)
        So I made widget and i putted that into begin play event but how can I put that it to variable?

        Comment


          #5
          Originally posted by Dev.Designx View Post
          So I made widget and i putted that into begin play event but how can I put that it to variable?
          Right click the ReturnValue of CreateStronaWidget and PromoteToVariable. This will create a reference variable to that widget which will allow you to access it later; it will also prevent the widget from getting destroyed if you remove it from the viewport.

          Comment


            #6
            Originally posted by Everynone View Post
            Right click the ReturnValue of CreateStronaWidget and PromoteToVariable. This will create a reference variable to that widget which will allow you to access it later; it will also prevent the widget from getting destroyed if you remove it from the viewport.
            It still doesn't work

            Comment


              #7
              I just answered the very last question. When you say it does not work, I believe you refer to the original issue where your Monitor blueprint does not respond to the keyboard key, right? As default the keypresses are handled by the PlayerController rather than a particular blueprint.

              You can override this behaviour, of course. Access ClassDefaults at the very top, scroll down to Input section and set AutoReceiveInput to Player0. This should allow this blueprint intercept the Action and Axis mapping.

              Comment


                #8
                Originally posted by Everynone View Post
                I just answered the very last question. When you say it does not work, I believe you refer to the original issue where your Monitor blueprint does not respond to the keyboard key, right? As default the keypresses are handled by the PlayerController rather than a particular blueprint.

                You can override this behaviour, of course. Access ClassDefaults at the very top, scroll down to Input section and set AutoReceiveInput to Player0. This should allow this blueprint intercept the Action and Axis mapping.
                It is working now! Thank you so much [MENTION=2637]Everynone[/MENTION] !!!

                Comment


                  #9
                  Originally posted by Dev.Designx View Post
                  It is working now! Thank you so much [MENTION=2637]Everynone[/MENTION] !!!
                  But when I press again E button it still shows me widget.

                  Comment


                    #10
                    Try it like this:

                    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	128.9 KB
ID:	1127051

                    Comment


                      #11
                      Originally posted by Everynone View Post
                      Try it like this:

                      [ATTACH=CONFIG]138950[/ATTACH]
                      If i press right click and i write there get widget reference it haven't show me anything there.

                      Comment


                        #12
                        You created a reference to the widget, right? You said it worked. That reference will appear on the list with all other variables. Drag it to the graph --> Get, right click convert:

                        Click image for larger version

Name:	Untitled.png
Views:	1
Size:	47.9 KB
ID:	1127053

                        It's pretty much the same as this, but will less wires, more convenient:

                        Click image for larger version

Name:	Untitled.png
Views:	1
Size:	40.2 KB
ID:	1127054
                        Last edited by Everynone; 04-28-2017, 01:21 PM.

                        Comment


                          #13
                          Originally posted by Everynone View Post
                          You created a reference to the widget, right? You said it worked. That reference will appear on the list with all other variables. Drag it to the graph --> Get, right click convert:

                          [ATTACH=CONFIG]138953[/ATTACH]

                          It's pretty much the same as this, but will less wires, more convenient:

                          [ATTACH=CONFIG]138954[/ATTACH]
                          It is working !!! thank you so much [MENTION=2637]Everynone[/MENTION] you are really helpfully !!!!

                          Comment


                            #14
                            Originally posted by Dev.Designx View Post
                            It is working !!! thank you so much [MENTION=2637]Everynone[/MENTION] you are really helpfully !!!!
                            If I want to pause game should that connect pause game to the exact of visibility ?

                            Comment

                            Working...
                            X