Unreal Engine Blueprint Fundamentals | Class #5 | For Loops & Arrays

Поділитися
Вставка
  • Опубліковано 27 вер 2024

КОМЕНТАРІ • 112

  • @NepahelmShadow
    @NepahelmShadow 5 місяців тому +14

    Please keep these videos up, they are excellent. Continue getting more complicated and more in depth with systems.

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому +5

      The hope is through you alls support we can not only keep them up but also keep making more :) Thanks for the watch and dropping feedback!

  • @L1MiTLeSS_7x
    @L1MiTLeSS_7x Місяць тому

    Thank you for your tutorials, has been the more clear that I found to understand the mechanics.

  • @ashskyqueen
    @ashskyqueen 3 місяці тому +1

    These classes are fantastic. 1st channel I've been able to stick with more than a few episodes without getting lost. The way you repeat explanations from previous lessons each time you use a method is extremely helpful. Thank you so much for making these lessons :D

    • @livinfreestyle6727
      @livinfreestyle6727  3 місяці тому +1

      Glad you like them!

    • @livinfreestyle6727
      @livinfreestyle6727  3 місяці тому +1

      I saw another question from you on vectors I beleive it was and I can't for the life of me find it anywhere.

    • @ashskyqueen
      @ashskyqueen 3 місяці тому +1

      ​@@livinfreestyle6727 I did have a question but I removed it. You basically answered it later in the video and I managed to resolve the problem I was having from there. Still loving the classes btw thanks so much :D

    • @livinfreestyle6727
      @livinfreestyle6727  3 місяці тому +2

      @@ashskyqueen phew...I thought I was losing it.

  • @robertomachado7581
    @robertomachado7581 22 дні тому

    This is awesome; thanks for showing the real example with the houses. Most teachers stop at printing strings, which is hardly helpful at all.

  • @alexvm8352
    @alexvm8352 2 місяці тому +1

    Enjoying this series! I feel like at some point here you should spend some time to talk about the different classes of blueprints (pawns, actors, etc) and how two different blueprints can reference each other, because currently this is very much a black box.

    • @livinfreestyle6727
      @livinfreestyle6727  2 місяці тому

      That’s a cool suggestion. I’ll put a “Birds Eye view• video on the list.

  • @juliar8342
    @juliar8342 5 днів тому

    Thank you very much again. I learned so much so quickly Super teaching

  • @drakouzdrowiciel9237
    @drakouzdrowiciel9237 5 місяців тому +1

    Thank you for your diligent efforts in education. Your dedication to sharing knowledge is truly appreciated.

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому +1

      That is great to hear. Thanks for dropping the comment and watching

  • @sauravbhagat4150
    @sauravbhagat4150 5 днів тому

    Thank you soo much this helped me find a solution to a totally different problem.

  • @Fred1989
    @Fred1989 2 місяці тому +1

    I've watched so far and there's a lot of easily digestible info, these are some thoughts I'm having so I figured I'd share!
    Classes and inheritance and so on seems like a natural progression after loops so I think that's good to have next, which I'll also watch, but I personally think it would be even nicer if everything you've taught up to this point came together in a natural way, not grocery lists and print strings and hypotheticals but like a small project. Especially since the target audience I think are people with no or little experience in either programming or blueprint and from my experience what usually holds them back is that they might understand the concepts well but actually putting it in practice with something they came up with on their own is either too daunting or too ambitious for a first real project.
    Then again, I don't think this way of teaching is wrong or anything but using what you learned in a real project is naturally a lot of fun, and these basics will also "click" faster when you actually put something together that can be played and have moments of "Oh! So that's where you can use this!"
    Maybe something simple like a Pacman project or something where you go over and use all the topics you've covered in this series. All you need is some walls out of cubes, some collectible coins out of cylinders, a couple of enemies out of squares that try to eat you, a player character out of a sphere or something and the content is simple enough to explain and to follow along with I'd say. And then there's also nice places to go over things like arrays to hold collectibles and enemies, vector math for very simple enemy detection so they try to eat you, timing stuff for things like power up spawns, variables to hold stuff like score and lives remaining the coordinates and direction and what not, loops to build the maze level and well, some basic collision on overlap and you basically have a game out of every topic you've covered so far minus the collision but that's also still pretty easy.
    Just an idea though, anyway, keep up the videos, I just stumbled on you so I figured I'd check out your content, there's a lot to binge but I'm looking forward to beyond the basics! 🙂

    • @livinfreestyle6727
      @livinfreestyle6727  2 місяці тому +2

      I think this is a great idea. And past me must have totally agreed and that’s why I started making mini games. Have you checked out the twin tickx shooter or the horde mode?? I have a couple more minigame videos coming, but there’s just so many videos to make overall. Thanks for watching and taking time to share your thoughts. Welcome to the channel!

    • @Fred1989
      @Fred1989 2 місяці тому +1

      @@livinfreestyle6727 Hah! I had no idea, I figured blueprint fundamentals would be a good place to start. I do have a C++ background but am completely new to unreal engine, so I figured I'd start with a playlist on blueprint, then move on to something like ALS or motion matching and go through as much documentation as I can digest. But I'm glad to hear past you agreed and had the same idea, I'll make sure to check it out! 😉

    • @Fred1989
      @Fred1989 2 місяці тому +1

      @@livinfreestyle6727 I just found the ones you mentioned in a new playlist, thanks!

    • @livinfreestyle6727
      @livinfreestyle6727  2 місяці тому +1

      @@Fred1989 After something like fundamentals, unless they have specific learning goals, the mini games are a good way to get the "bigger picture". You also posted a comment about asynchronous stuff at one point (did you remove it?) that I can't find. I was just going to say "thanks for sharing so much info and maybe I can do a vid on it at some point".

    • @livinfreestyle6727
      @livinfreestyle6727  2 місяці тому

      @@Fred1989 👍

  • @gregnelson4068
    @gregnelson4068 Місяць тому +1

    You mention that the For Loop is preferable so that you can manipulate the index of the array element, but the For Each loop also has an index that you can use for that same purpose and is generally better when processing the whole list. The Advantage that I see with the For Loop over the For Each Loop is being able to control start and stop points, so if your array is too long to process between frames, you could break it up into 2 or more parts to help reduce lag.

    • @livinfreestyle6727
      @livinfreestyle6727  Місяць тому

      I generally use For Each. I only use the for loop in specific cases where I need to manipulate the index as you have described. I don't remember saying the for loop was better. I think I said it was better or would help solidify our understanding of arrays and the indexes, but it was a while ago so who knows. So for clarity, I use ForEach almost all the time

    • @gregnelson4068
      @gregnelson4068 Місяць тому

      @@livinfreestyle6727 It was at 23:00 in the video where you said that "this is an example of when you might want to use the index, start and stop...", pointing directly at the For Loop instead of the For Each Loop, even though the For Each Loop has the same built-in index mechanism.
      Of note, and I had to dig through some documentation to find this, the for/while looping mechanisms in UE are designed to execute entirely between frames, which means that you cannot use a Delay inside these built-in looping mechanisms, and would have to make you own home-brewed loop using conditional branching if you wanted to have it contain a Delay inside the Loop itself.

    • @livinfreestyle6727
      @livinfreestyle6727  Місяць тому +1

      @@gregnelson4068 Yeah that's fair. I wonder if in the old days it didn't have the index and so I kind of overlook it. Good call out. As far as delays etc in loops, yeah anything with time can be fun. I have found more and more that my own rule is if I'm using a delay then it's worth rethinking cuz maybe there's a better way to achieve it (because of multiple times where the delays don't work within a tick etc etc)

  • @alexrybin3798
    @alexrybin3798 4 місяці тому +2

    This is awesome tutorial!!! Thank you!

  • @Elnaz_Heydari_22
    @Elnaz_Heydari_22 2 місяці тому

    Thanks a lot … I enjoy your course a lot aside from being really helpful ✌🏻✌🏻✌🏻

  • @erichorton1440
    @erichorton1440 9 місяців тому +1

    Fun class. This was the toughest so far. I can't wait to put this to use one day. Thanks.

    • @livinfreestyle6727
      @livinfreestyle6727  9 місяців тому +2

      You are charging! I'm serious about needing to get more vids going.

  • @MuhammadyoaneYatalathov
    @MuhammadyoaneYatalathov Місяць тому

    great explanation sir!

  • @pbm000
    @pbm000 5 місяців тому

    As always, a very helpful tutorial that imparts important knowledge.
    It would have been cool if you had explained the modulo operator.
    I spoke about it with chat gpt for quite a long time and I understand the concept, but it still confuses me when I think about it.😅
    Thanks for the tutorials!😊

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому +1

      oooo...operators. Maybe we can do a vid on those. Thanks for the watch and the comment

  • @legotimebombshorts4231
    @legotimebombshorts4231 5 місяців тому +1

    Another great video. Man all the tools are just crazy. I hope that one day I can really call these types of tools to memory. Just so much to remember. lol

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому +2

      You will for sure. I still look up so many things "how did that work", but you'll get faster and faster

  • @robertbeniko66
    @robertbeniko66 2 місяці тому

    This is awesome! I'm currently making a game kind of similar to Crusader Kings. It got to the point where I have so many cascading branches that I'm just like "There's got to be a better way of doing this..."
    The problem I have is that I always knew roughly what a For/ For Each loop did, I just can't wrap my head around all the different scenarios in which they can be used for.
    So, for example, in my game there are a bunch of different settlements... each settlement has their own farms, sawmills etc. and each of those buildings are different levels...
    So I'm trying to visualise how I can get each building for whatever current settlement you have selected and then do upgrades, resource production etc. I'm thinking I may have to go back and create some arrays for the buildings in each settlement.
    I did design it on paper first, and I have a GDD for it... it's just one of those things where it all looks good on paper until you start building it and then you realise something isn't right 😅

  • @mohamedel-gazzar5818
    @mohamedel-gazzar5818 5 місяців тому

    This series is great! One of the things that I don't understand is the difference between "Get" and "Set"

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому +2

      "Get" will get the current value of a variable. "Set" will set the value of the variable for later use. Glad you are liking the series

  • @crs11becausecrs10wastaken
    @crs11becausecrs10wastaken 8 місяців тому

    Thank you for doing this series.
    You've been incredibly helpful!

  • @roberterdos
    @roberterdos 7 місяців тому

    Thanks, Kevin! I had the best day following this series. I am not new to scripting, but you've filled a lot of gaps in my knowledge by patiently trough all these steps, especially in Unreal Engine. Thanks for being part of my Unreal Journey!

    • @livinfreestyle6727
      @livinfreestyle6727  7 місяців тому +1

      Glad it was helpful! Working on more vids and a guide to know what's where. Also don't forget to check the "Live" section for more general tutorials. Thanks for watching and dropping feedback

    • @roberterdos
      @roberterdos 7 місяців тому +1

      @@livinfreestyle6727 oh shit, the live section! That's it, I'll dedicate my life to watch all your videos:))

    • @livinfreestyle6727
      @livinfreestyle6727  7 місяців тому +1

      prob only want to go back to around august. That's when we found the new format. Before that was way more free form

  • @dendroslime1155
    @dendroslime1155 2 місяці тому

    Thanks! I needed your lecture to have better understanding on the topic :D

  • @Fizziepop
    @Fizziepop 5 місяців тому

    There is so much in this series that I need! I hope you get into the best way to store or organize data too, idk if that is arrays or data structures or databases (are there more ways?) For context, I am thinking specifically about game creation like, RPG with lots of creatures, furniture, and inventory management.
    I found this playlist while I was trying to research what is and how to use a database - with the suspicion that that's what I will need.
    Thanks again

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому

      Database is on the list, but it sort of got deprioritized cuz there is so much to do before that. But we'll get to it. Glad you are finding value in the series

  • @THikkikomori
    @THikkikomori 10 місяців тому

    Thank you so much for this comprehensive explanation.

  • @kenechukwuuzongwa1423
    @kenechukwuuzongwa1423 5 місяців тому

    You are an amazing Tutor! Thank you again!!!!!!!

  • @littledemo3605
    @littledemo3605 3 місяці тому +1

    can u please explain like this input movement function , from scratch what the equation !! input axis ! direction ! speed . please make input movement , camera controller built in function from scratch to understand what happen!

    • @livinfreestyle6727
      @livinfreestyle6727  3 місяці тому

      It sounds like something we cover in the twin stick shooter. Check it out. Create Your Own "Twin Stick Shooter" Mini Game | Unreal Engine Beginner Tutorial
      ua-cam.com/video/Wg7BGVOOk5c/v-deo.html

  • @DarkSession6208
    @DarkSession6208 5 місяців тому +2

    I have a question that i was wondering about for a long time. If i have a Struct and give a Float a Value and name the variable its self explainatory what happens in runtime. If i make a Float or String ARRAY its also self explainatory because i can get the index at runtime. But what happens when i have a struct and use a Enum Array for a variable? Does the Struct store two Enum REFERENCES, so can't i access whats inside of that or are there two references to those enums and i can also access the contents (default variables of those enums) ?
    So as a practical example :
    Enum Weapons - Knife, Rifle, Launcher
    Enum Ammo - None, Bullet, Rocket
    Struct - Guns
    Weapon Types & Ammo - Enum Array - Enum Weapons, Enum Ammo
    If i make a struct and feed in both enums, but when i call to get the values INSIDE those enums at runtime will it return the Enum Adress itself or also the variables inside that enum?

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому

      The example is sort of confusing...let me see if this is your question. if you have ENUM_WeaponType and ENUM_AmmoType
      and you make a struct
      STRUCT_Weapons
      Name -> String
      Type -> ENUM_WeaponType
      AmmoType -> ENUM_AmmoType
      you then have an array of weapons of your struct you will have
      Pistol, Gun, Bullet
      Rifle, Gun, Bullet
      RPG, Launcher, Rocket
      if you then get the Weapons[0] you will get back a struct that has all the info....Pistol, Gun, Bullet

  • @vladimirxoxoxoxox2938
    @vladimirxoxoxoxox2938 3 місяці тому

    Thank You for your tutorials! How would You change materials of all elements in array usig the same example?

    • @livinfreestyle6727
      @livinfreestyle6727  3 місяці тому

      getMaterials, returns and array. The foreach over the array and set material (using the index) to whatever you want it to be). I think I cover it in this vid:
      ua-cam.com/users/liveiPlgo_pVqys?feature=share

  • @EdwinCollingridge
    @EdwinCollingridge 11 місяців тому

    Keep Up the Great work🦾

  • @ThatsJoshTyler
    @ThatsJoshTyler 6 місяців тому

    As a beginner, what are some basic practice projects I could do that would utilize everything we learned from video 1 through the end of this one.

    • @livinfreestyle6727
      @livinfreestyle6727  6 місяців тому

      I'm a fan of learning in context. So any "mini" experience/game you can find that is in the genre or direction of the things you want to create would be great. So if you wanna make a platformer, basic platformer tutorials for example.

  • @ayaakiosawa0
    @ayaakiosawa0 9 місяців тому +1

    28:32 issues with SetWorldScale 3D. Default Scene Root doesn't seem to allow Target input pin like your example. I'm using 5.3.2

    • @livinfreestyle6727
      @livinfreestyle6727  9 місяців тому

      Is your hierarchy different in the top left under the components section?

    • @livinfreestyle6727
      @livinfreestyle6727  9 місяців тому

      Also in the Top Right is your "Parent class: Actor"

    • @roberterdos
      @roberterdos 7 місяців тому

      same issue. hierarchy correct - check, parent class: actor - check. I can't find scale nodes for the array element output pin out of the For node

    • @roberterdos
      @roberterdos 7 місяців тому +1

      it's a bug. I deleted the For loop, then i've made a new one, and all is good.

  • @Orbit_Offical
    @Orbit_Offical 4 місяці тому

    One question what PC are u using and please if u can provide the specs ? Thanks for your brilliant videos by the way!

    • @livinfreestyle6727
      @livinfreestyle6727  4 місяці тому

      This was my previous PC (the one at the time of the recording):
      Intel XEON E3-1230 v5 Quad-Core 3.4GHz (3.8GHz TurboBoost)
      NVIDIA GeForce GTX 1080 Founders Edition
      64GB ECC UDIMM DDR4 2133MHz (4 X 16GB)
      It could not handle streaming at 4k and unreal at the same time so I eventually had to upgrade in order to get you all higher rez.

  • @GenaroDev
    @GenaroDev 6 місяців тому

    the only issue i had was to destroy object from an array . like i had a collision and get all objects inside it and wanted to delete them. but it keep throwin errors

  • @Salvag3dHalos
    @Salvag3dHalos 2 місяці тому

    I do not know what I broke, but after getting to about the end, now when I go back to the old parts of the BP and connect the event begin play to them, they just run the loop over and over again rather than stopping, even the ones we made where it should only run the number of index -1, still prints the name over and over. It seems like it has to do with the number of times I duplicated the house on in the viewport. That determines how many times it tries to run the loop. Any idea how to fix that? Does it have to do with the fact that each of those things also have the same BP attached to them?

    • @livinfreestyle6727
      @livinfreestyle6727  2 місяці тому

      Can you hop in discord and post your blueprint? It'll be easier to help

    • @Salvag3dHalos
      @Salvag3dHalos 2 місяці тому

      @@livinfreestyle6727 Just posted it as "Thanks for checking this out.". Thanks!

  • @de0750
    @de0750 Місяць тому

    Thank you for your tutorial. I have a question. You accessed to house actor with 'Get Actors of All classes', but if I want to access to the mesh in level but which is not blueprint mesh. If I want to control the mesh(or mateirals that inlcuded in that mesh) in my specific blueprint, is it possible to access to the normal mesh? (I am sorry for my bad English, hope you understand my question)

    • @livinfreestyle6727
      @livinfreestyle6727  Місяць тому +1

      You mean the skeletal mesh or the static mesh within a blueprint? In that case you would get the blueprint, then get component by class OR if you already have the "type" of BP you can just access it directly

    • @de0750
      @de0750 Місяць тому

      @@livinfreestyle6727 Thanks!

    • @livinfreestyle6727
      @livinfreestyle6727  Місяць тому

      ​@@de0750 👍

  • @user-hehhe
    @user-hehhe 21 день тому

    whats that % nodes do?

    • @livinfreestyle6727
      @livinfreestyle6727  21 день тому

      Its called a "mod" short for modulo and it's a math function that returns the remainder

    • @user-hehhe
      @user-hehhe 21 день тому

      @@livinfreestyle6727 HEY When i make changes like in mod(%) node i put the value 3 after that i see my 2 models get bigger and when i change my value to 4 it still make 2 models bigger instead of 1 (i put 5 models on my map)

  • @R4k00n3D
    @R4k00n3D Місяць тому +2

    Thank you so much! These kind of tutorials is what the industry needs, not just simple "follow my lead" type without explaining the why's and how's! Congratulations!

  • @whitedeath5057
    @whitedeath5057 29 днів тому

    Hey I'm learning UE after about a year and a half in Unity, am i correct in assuming we'll use C++ for advanced custom behaviour such as character movement etc, and use blueprints for the majority of the simple tasks we have?

    • @livinfreestyle6727
      @livinfreestyle6727  29 днів тому

      In that specific case, maybe. There are already several character movement components that are available in BP and you would only have to go to C++ if you wanted to create a custom one.

  • @mirphoyo8964
    @mirphoyo8964 6 місяців тому +2

    Wow this is an amazing channel! it's hard to find thorough tutorials like these I find, yours are high quality. I lack the blueprint fundamentals and I get lost so easily trying to figure it out on my own without scripting experience, I'm relieved I can go through all your videos and learn properly!! Very good class and good pace, thank you so much for taking the time to make these!!

    • @livinfreestyle6727
      @livinfreestyle6727  6 місяців тому +1

      Glad they are helpful, thank you for taking time to drop a comment and let me know.

  • @notcrazy
    @notcrazy 5 місяців тому

    What do I do if i want the house to change one by one with a delay in between? And thank you so much for the great series :)

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому +1

      You can try delay nodes, BUT delay nodes in For Loops often don't play nice (it messes with time and your for loop is trying to finish in one tick) so you might need a timer by event instead

  • @mohbal1461
    @mohbal1461 4 місяці тому

    ❤ You are amazing ❤

    • @livinfreestyle6727
      @livinfreestyle6727  4 місяці тому +1

      Thanks moh and thanks for dropping feedback and the watch!

  • @SJ98296
    @SJ98296 5 місяців тому

    I recently tried to use a 'while loop' with a check for if the random item was unique or not. It was in an effort to randomize an ordered array, which I later found could have been done with a shuffle node instead. I would be interested to know what your thoughts are on both the 'do while' (mainly because my setup would error on occasion, calling it an infinite loop detected error) and on the add unique node, since it will output a -1 index if the attempted add was not unique. What sort of use cases are there for these nodes on their resulting behaviors?

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому

      I generally use "do while" very sparingly, I actually can't even remember the last time I used one and this is largely because of the infinitely loop potential. Often a do while can either be solved with whatever you are doing in a timer or tick. If I find my next use case for a while loop, I'll post it here. As for add unique, use this all the time. If I am keeping track of characters, items, projectiles etc, I don't generally need more than one reference for example.

    • @SJ98296
      @SJ98296 5 місяців тому

      ​@@livinfreestyle6727 Thanks for the fast reply. I appreciate your insights! I still think that my setup was reasonably safe, and it did work for randomizing the array output, but it would enter the infinite loop crash if I tried to apply it to too large a group (this was a card dealing function, where I wanted to pull random cards from a deck of cards). When used on less than 10 it worked consistently, but with more than 10 it would crash frequently, and more than 12 it would crash every time. So strange! Thanks again!

    • @livinfreestyle6727
      @livinfreestyle6727  5 місяців тому

      @@SJ98296 Is there any reason you couldn't use a card deck and just get a random int in range to get the value from an array randomly? Just keep track of the index so you don't use the same one twice type thing. Don't know the full extent of the application but that does work for getting random stuff

  • @CGokce6
    @CGokce6 9 місяців тому

    Thanks again Kevin, great as always. Just wanted to understand one thing. Why did you set array elm when you can use print string? Isn't that the same thing? Thanks

    • @livinfreestyle6727
      @livinfreestyle6727  9 місяців тому +1

      Can you help me out with at what time stamp? I'm looking through now but can prob get you a quick response if I know where in the vid

    • @CGokce6
      @CGokce6 9 місяців тому

      @@livinfreestyle6727 ah of course its from 20:24>
      also I see you get actors of class because you have a bp mesh...what if I just wanted to get all static meshes in the level? Do I need to use tags? Thanks again!

    • @livinfreestyle6727
      @livinfreestyle6727  9 місяців тому +1

      Got it now. The point of this was to actually update the values that were stored in the array. I could have gotten the item, appended an 'S' and printed the result and that would have printed the same thing, but the whole point was to actually update the stored values in each index

    • @livinfreestyle6727
      @livinfreestyle6727  9 місяців тому

      I believe you can just 'GetAllActorsOfClass' and set your class to StaticMeshActor

    • @CGokce6
      @CGokce6 9 місяців тому

      @@livinfreestyle6727 ah sorry I mean't a specific static meshes in the level.

  • @WestinsWorldStudio
    @WestinsWorldStudio Рік тому +1

    Great video!

    • @livinfreestyle6727
      @livinfreestyle6727  Рік тому

      hit me with a way to contact you. Im at kevin@livinfreestyle.com