Announcement

Collapse
No announcement yet.

How can i get variable from UMG Widget blueprint, in other blueprints ?

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

  • replied
    i read the tut on the top of the post,

    so i need to cast my widget action into a actor variable by set it ?

    Click image for larger version

Name:	700px-CreateJoyUI.jpg
Views:	1
Size:	131.2 KB
ID:	1100267
    Last edited by Oink_Oink; 02-10-2016, 05:02 PM.

    Leave a comment:


  • replied
    same here,

    i have 3 blueprints
    2 master items blueprints and my main Hud in UMG

    I got buttons in my masters blueprints. Those masters are placed in my main HUD.

    I want to affect other UMG Blueprint when i press button.
    But i cant cast to other blueprint because i dont understand it

    i need help too

    Leave a comment:


  • replied
    I try to understand the same thing, but can't use casts because I did not generate the Widget in the graph Editor,
    instead I placed the widget into another Widget in the Designer which seems to work out. But now I have a button inside
    one Widget and if that is being pressed, it should deactivate a Widget and activate another one instead.
    I have Boolean vars to set if the Widget is active or inactive, but don't know how to access those Variables from another
    Widget. Can please someone explain it a bit so a newbie would understand it ? Until now in this thread there are only
    fragments of information that seem to make no sense.

    Leave a comment:


  • replied
    I do actually show how to communicate between My Character BP and UMG in my tutorial

    https://forums.unrealengine.com/show...-Dynamic-Array

    you need to save a casted version of your UMG widget in your Character BP to then get/set its vars

    You should look closely at my pics in my tutorial!

    Beyond that I do offer tutoring services:
    https://forums.unrealengine.com/show...Game-Mechanics

    Rama

    Leave a comment:


  • replied
    Bump. still need your help guys.

    Leave a comment:


  • replied
    I'm trying to understand this problem for about a week, and no results.
    But it should be easy, I just need to understand the logic. I need to assign a variable from UMG, to the variable of MyCharacter. Help me man! :C
    There some pics, with my problem.

    This is button click event.
    Click image for larger version

Name:	Example 1.jpg
Views:	1
Size:	361.9 KB
ID:	1056862

    This is how i create widget and add to viewport.
    Click image for larger version

Name:	Example 2.jpg
Views:	1
Size:	310.9 KB
ID:	1056863

    And this is how i set the "name variable" of my character. I know about casting, but what should i cast and on what ?
    Click image for larger version

Name:	Example 3.jpg
Views:	1
Size:	379.3 KB
ID:	1056864

    Leave a comment:


  • replied
    UMG Tutorial Update

    I updated my UMG tutorial to answer an important question!

    So I now have a FAQ section

    https://wiki.unrealengine.com/UMG,_C...amic_Array#FAQ

    Rama

    Leave a comment:


  • replied
    Originally posted by Div1ne Duck View Post
    Rama, one more question, when i create widget on level bp, i must casting it on my character bp ?
    Can you show a picture of your question, or explain more?

    Leave a comment:


  • replied
    Rama, one more question, when i create widget on level bp, i must casting it on my character bp ?

    Leave a comment:


  • replied
    Originally posted by soulmapp View Post
    How about firing a custom event in a actor class blueprint.. from UMG

    That is in my tutorial as well!

    https://forums.unrealengine.com/show...l=1#post146513

    Check out the section about binding the button Event!

    https://wiki.unrealengine.com/UMG,_C...ate_Bind_Event


    You can put any BP code you want there!

    To get the actor so you can fire the event you have many options

    1. create a variable in the UMG BP, for your actor, and set the variable when the UMG widget is created, wherever it is created.

    2. use BP interface

    3. Get All Actors of Class, and find the one you want by name

    I would tend to prefer option 1, assuming you create the UMG widget in your level BP or your My Character BP, you should be able to set the var on your UMG widget right there!



    Rama

    Leave a comment:


  • replied
    Originally posted by Rama View Post
    Casting

    I posted a complete tutorial that shows interaction between UMG widget blueprints and the My Character blueprint, it has lots of pics!

    https://forums.unrealengine.com/show...l=1#post146513

    As you will see in my tutorial you need to cast your UMG widgets and then access the variables of each of your widget elements.

    So there are a series of casts involved!

    If you walk through my whole tutorial you will have the answer to your question when you are done!

    Rama

    How about firing a custom event in a actor class blueprint.. from UMG

    Leave a comment:


  • replied
    Originally posted by Div1ne Duck View Post
    Thank you, you helped me a lot!
    Yay!









    Rama

    Leave a comment:


  • replied
    Thank you, you helped me a lot!

    Leave a comment:


  • replied
    Casting

    I posted a complete tutorial that shows interaction between UMG widget blueprints and the My Character blueprint, it has lots of pics!

    https://forums.unrealengine.com/show...l=1#post146513

    As you will see in my tutorial you need to cast your UMG widgets and then access the variables of each of your widget elements.

    So there are a series of casts involved!

    If you walk through my whole tutorial you will have the answer to your question when you are done!

    Rama

    Leave a comment:


  • replied
    If I understand you correctly, I made a couple of screenshots to show the result.
    This is example of my event.
    Click image for larger version

Name:	Example.jpg
Views:	1
Size:	408.5 KB
ID:	1056840
    This is some errors in log after i try it in game.
    Click image for larger version

Name:	Result.jpg
Views:	1
Size:	405.3 KB
ID:	1056841

    Help me with this, what did I do wrong? It looks very simple, but I'm trying to figure it out for several days, and there are no results.

    Leave a comment:

Working...
X