RTS Game - Basic UI For Selected Units (Unit Portraits & The Selected Units Area)

Sdílet
Vložit
  • čas přidán 17. 03. 2022
  • We'll make the first UI elements of the RTS game - Unit Portraits and the Selected Units Area. This is the area on the screen that shows the player which units they currently have selected. We'll introduce functionality to click unit portraits to select that individual unit (for micro management for example), and we'll also react to the player hovering the mouse over unit portraits by highlighting the image and the unit selected decal!

Komentáře • 43

  • @tucaja1240
    @tucaja1240 Před 9 dny

    The f.. Best, el bicho, I wish you the best and I hope to see more content like this again, thank you

  • @untossablesalad4423
    @untossablesalad4423 Před rokem +2

    This tutorial was mind-blowing, much appreciated

  • @Jon_Kristianson
    @Jon_Kristianson Před rokem +3

    Love your content man, really clean and simple code ! Cheers one more subscriber and will definitly like your videos ! Can't wait to see more of your content !

  • @kosh_vpaul
    @kosh_vpaul Před rokem +1

    It looks like we think same way, every next video is exactly what is in my todo list, thanks, it's usefult to watch it, to have more ideas for best possible
    implementation

  • @adriancastro3763
    @adriancastro3763 Před rokem +3

    For those with the issue: "variable from unit image is none": 1. create a variable in selected units widget. go to graph and on event construct add a cast to texture 2d and set the new variable to it. then from the unit image object that you 'get' , you get the brush, split its nodes to get the brush image and link to the texture 2d cast. So you are taking the image from the brush and not the image widget to change the texture. In the parent class instead of setting the brush from texture, you set the new variable to the "2d image" variable. BIND THE IMAGE VARIABLE TO THE BRUSH IN THE widget image object. And thats it, hope it helps.

  • @GrunkleSoos
    @GrunkleSoos Před 2 lety

    Thanks for making this series!

  • @scorp9838
    @scorp9838 Před 9 měsíci

    Thank you so much

  • @LupusMechanicus
    @LupusMechanicus Před 2 lety

    cool dude

  • @CourierSpycrab
    @CourierSpycrab Před rokem +3

    Getting This Error Blueprint Runtime Error: "Accessed None". Node: Add Child to Horizontal Box Graph: EventGraph Function: Execute Ubergraph RTS Player Controler Blueprint: RTS_PlayerControler Please Help

  • @stephenslack3892
    @stephenslack3892 Před 2 lety

    I had an issue where having the image as "is variable" did not work. For some reason the set brush from texture was not displaying the image. I got around this by setting "is variable" is false, and just plugging in a texture 2d variable I created. This way you can just set the texture 2d from the unit base. Just posting this in case anyone else runs into this issue.

  • @AMobOGobos
    @AMobOGobos Před rokem

    Excellent video. I am having an issue with the unit selections. The unit portraits seem to enter the widget in an order that is different from where they are on the map. I have tried renaming the individual units (thinking maybe it was indexing them by their name), but that has not resolved the issue.

    • @levaben
      @levaben Před rokem +1

      I had the same issue. It depends in which order did you added the units to the screen. if you delete all of them, then you put each ony-by-one to the screen the unit order will be fine.

  • @ohtontheknight3879
    @ohtontheknight3879 Před rokem

    Question i am new at unreal and i wanted to know on how do i have the ai units always selected until i press left or right on the d pad to switch unit type's

  • @distrito8987
    @distrito8987 Před 2 lety +2

    Heeeelp! I've been breaking my head over this, the event on mouse leave won't trigger, everything else works perfectly fine but the highlighted decal wont't ever go away since the event is not triggering, not even stoping when adding a breakpoint. Mouse enter works just fine tho. What am I doing wrong?

    • @elite_ramsay1667
      @elite_ramsay1667 Před rokem

      did you find a way to fix it I'm currently having trouble myself?

    • @itanocircus2077
      @itanocircus2077 Před 9 měsíci

      There are two places to check:
      1.) In SelectedUnitWidget, ensure that the "Set Brush Tint Color" goes to the white color (Unhighlight -> White, Highlight -> Yellow)
      2a.) In Parent_Unit_class, ensure that "Event Highlight Unit" sets the Decal Material to "Highlight_Decal_MAT" and...
      2b.) the "Event UnHighlightUnit" sets the Decal Materia to "Selected_Decal_MAT"
      You need to make sure that you tell the selector what decal to revert back to. If both decals are the same, the event will fire but appear to do nothing. One way to check your Events are firing is to put a "Print" statement within the event.
      Good luck!

  • @balazsbartus8974
    @balazsbartus8974 Před 9 měsíci +1

    hey! Can someone please help me? At 10:01 you should connect the SelectedUnitsArea to the UnitsBox variable, but for me the "get UnitsBox" variable is not visible (with context sensitive) and if i turn off context sensitive it shows up but in the class subfolder and not in the variables subfolder like in the video. I have watched the video 5 times or so from the begining and did exactly what the tutorial told me to do but this part got me stuck. (EU5 v5.3)

    • @balazsbartus8974
      @balazsbartus8974 Před 9 měsíci

      Okay, nevermind. I found the problem. If anyone else is having the same issue then make sure that the SelectedUnitsArea variable is set to Selected Units Area type

    • @adamrobinson908
      @adamrobinson908 Před 2 měsíci +1

      @@balazsbartus8974 you will also need to tick "is variable" when you make the unit box

  • @mugengaming4401
    @mugengaming4401 Před 2 lety

    Selected Unit portraits dont Appear in the Widget on screen :[ help?

  • @ivomollov3073
    @ivomollov3073 Před 5 měsíci

    Hi there! When selectin units and have their widgets appear, can we expect them to be in the same order as they were selected (first on the row is the first selected, second is second selected and so on)?

  • @CrisMorsta
    @CrisMorsta Před 2 lety

    Can you make a tutorial of how you can put joystick mobile controller version

  • @mugengaming4401
    @mugengaming4401 Před 2 lety

    I cant seem to "Event AddUnitToSelectedUnitsArea at 9:52" Only shows up as a message not an event.

    • @mugengaming4401
      @mugengaming4401 Před 2 lety

      Somehow my RTS Interface wasnt set in Class Settings...?

  • @TheSharkkyy
    @TheSharkkyy Před 2 lety

    When I try to put the Selected Unit Widget array from Event Add Unit to Selected Units Area into the content node of Add Child to Horizontal Box it says the reference is not compatible :(
    Anyone else have this issue?

    • @arosinek
      @arosinek Před 2 lety +1

      Check Variable Type - mayby u set something wrong :)

    • @aggressor7176
      @aggressor7176 Před rokem

      In RTS_interface go to the function "AddUnitToSelectedUnitsArea" and check if the Input "SelectedUnitWidget" is type of "User Widget" and "Single". I had the same problem as it was by default type "Array" and not "Single"

  • @user-nl8ub4vz3w
    @user-nl8ub4vz3w Před 10 měsíci +1

    Thanks for the video, ive made a mistake and cant tell where? iam using 5.3, my units move with right click but if i marquee select them then click the widget ui it all highlights but the unit wont move then, although it did reduce down to 1 on the widget ui.

    • @user-nl8ub4vz3w
      @user-nl8ub4vz3w Před 10 měsíci +1

      Event Select Single Unit, Units pin to Add Unique

    • @middleagedshred
      @middleagedshred Před 8 měsíci

      @@user-nl8ub4vz3w thanks man..that got me too..)

    • @penguinooo9747
      @penguinooo9747 Před 5 měsíci

      Same here thank you!!! @@user-nl8ub4vz3w

  • @pierreseaumaire6988
    @pierreseaumaire6988 Před rokem

    OMG I WANT TO REACH IT !!!
    \

  • @michalh6977
    @michalh6977 Před 2 měsíci

    Hi guys I did all by tutorial but NPC is not yellow higlighted when trying to hover over image :( Can somebody help me to fix it please? Im starting to learn so professional language is still hard for me. Thank U 🙏🙏🙏🙏🙏🙏 .

  • @pierreseaumaire6988
    @pierreseaumaire6988 Před 11 měsíci

    Why I cannot acces UnitImage variable ... omg

  • @pierreseaumaire6988
    @pierreseaumaire6988 Před 11 měsíci

    again

  • @mugengaming4401
    @mugengaming4401 Před 2 lety

    These are awesome. Maybe go a liiiiiitle slower for us new people/

    • @TheSharkkyy
      @TheSharkkyy Před 2 lety +1

      I thought the same, but just pause and go back where I need to catch up :)

  • @pierreseaumaire6988
    @pierreseaumaire6988 Před 11 měsíci

    It's decided I stop ue5

  • @pierreseaumaire6988
    @pierreseaumaire6988 Před rokem

    im noob

  • @pierreseaumaire6988
    @pierreseaumaire6988 Před 11 měsíci

    BOUhouhouhou why WHYYYY How many hours on this for nothing pls god help me

  • @pierreseaumaire6988
    @pierreseaumaire6988 Před rokem

    So fustrating, i've follow another large tutorial on rts, and you have kind of different approach ( and im also noob) so I din't achieve this tut restarting 3 time and changing stuff from stuff )4