UE Blueprint Fundamentals | Class #5-1 | Loops & Arrays Applied #1

Поділитися
Вставка
  • Опубліковано 27 вер 2024
  • This Unreal Engine Blueprint Tutorial covers using For Loops and Arrays to find the closest object in a scene. This is the first of 3 methods to achieve the goal and is part of our Blueprint Fundamentals series.
    🌟 This tutorial strives to offers insights, advice, and techniques for creating with Unreal Engine and Blueprints. Don't miss this chance to level up 🚀 your development skills, get your burning questions 🤔 answered, and connect with our supportive community! 🌐
    Truly thankful for supporting the channel.
    Tips are welcome! (We also have Patreon below and supers):
    www.paypal.com...
    🔗 Join our discord server for questions and community:
    / discord
    Join our Patreon to vote for upcoming topics, download tutorial content, as well as early access to tutorials and live dev streams.
    / askadev
    #UnrealEngine #Blueprints #GameDevelopment #GameDesign #UnrealEngineTutorial #gamedev #virtualproduction #unrealengine5tutorial

КОМЕНТАРІ • 80

  • @Theheartless99
    @Theheartless99 11 місяців тому +20

    Two weeks ago I was lost as fuck. Now I watch these videos for fun just trying to link the logic behind the decisions. And it’s starting to add up. It’s all starting to make sense. Your videos in specific are VERY good for how my brain works. You speak in concepts rather “just memorize this”. So thank you very much. I hope you start making videos about animation blueprints and complex state machines like ones you’d find in a fighting game. I’m still trying to wrap my head around what a state machine would look like with cancelable moves, combo strings and changing hitboxes

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

      I will post the schedule in discord and we can get some voting going, but right now I think we start our intro anim BP next week.

    • @Theheartless99
      @Theheartless99 11 місяців тому +1

      @@livinfreestyle6727 I’m excited let’s get it!

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

    Great videos for beginners. And very easy to follow even for non english natives. Thanks a lot!

    • @livinfreestyle6727
      @livinfreestyle6727  27 днів тому +1

      Thats good to hear on the language front. I love new languages so understand what it's like to try to understand in a new language

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

    (If you're still using the project with the houses scattered around, you can easily follow along by choosing the BP house template as the actor class)

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

      Good note, thanks for chiming in and helping out!

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

      @@livinfreestyle6727 Thank YOU for these videos! Honestly! They're very accessible and even tho I'll need some rewatches for the hardest concepts, I actually feel like I'm learning stuff!

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

      tried that and it when i drag from the array element on the for each loop to the closestobjectsofar i get an actor object reference is not compatible with bp house template object reference

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

    I started playing around with ue5 about 2-3 months ago and started working on my first project by following along some how to videos. Problem is I was just copying their work rather than understanding the logic. I just went through the first half of your playlist in the past week and I'm starting to understand the connections between some of the blueprints. Thank you so much your teaching technique is amazing and I'm not completely lost like I was last week

    • @livinfreestyle6727
      @livinfreestyle6727  23 дні тому

      That is so great to hear. Thanks for taking time to let me know

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

    As always, thank you for your videos and see you in the next one!🙇🏼

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

    Got this working by creating a BP_ItemBase and under components in its BP adding SM_ChamferCube as the static mesh if anyone else is stuck at that part. Drop them around the level and the tutorial works as shown.

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

      Thanks for helping out, commenting and watching!!

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

      @@livinfreestyle6727 i also did an event tick -> add relative rotation from previous lesson on the BP_ItemBase because im extra. SO FAR SO GOOD YOU HAVENT LOST ME

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

    Another great class! :D

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

    Another excellent class, excited to put these into use.
    I went a little further and got the function to also print the distance between the player and the selected item. Feels good to feel like I'm actually learning how to do this and put it into practice. :)

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

    another good vid. thanks

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

      It'll be cool to see what kinds of things you feel like are "gaps" when you finish all these. Working on the next UI video now. Thanks again for watching!

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

    Another great video! Thank you.

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

      Thanks for dropping comments as you watch all these.

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

    Great tutorial! I still have a few more to go to catch up to your current content.

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

    For anyone following along and you put together a base item blueprint class using a default cube; set the sphere radius to 100...
    Don't be like me and make the radius 50 because the square is bigger than that and you won't see it so you'll think you did something wrong 😅😂

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

      I love everyone sharing all their "speed bumps" to help others out. Thank you

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

      You're very welcome; It's the least I can do!
      Your hard work on these videos gives me the chance to learn what I otherwise couldn't afford, and that gives me the chance to do something I'm super excited for, so thank you! 😁
      @@livinfreestyle6727

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

    Thanks man! And thanks again for the help on discord the other day your a legend ! I thank you for ur patience with me :)

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

      Of course! Sometimes it is just easier to see/talk about it. :)

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

    with fundamental... Am I right. 2, which videos for next is good after fundamental

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

      I would say inheritance: ua-cam.com/video/w9d2aVRjBrU/v-deo.html
      and interfaces maybe: ua-cam.com/users/liveoTST9didni4?feature=share
      OR the twin stick shooter to give you overall context: ua-cam.com/video/Wg7BGVOOk5c/v-deo.html
      there's also all the UI stuff

  • @johnseiler5668
    @johnseiler5668 8 днів тому

    At 8:18, when I try to connect the Array Element output from the For Each Loop to the input of SET ClosestObjectSoFar I receive the error "Actor Object Reference is not compatible with BP Item Base Object Reference".

    • @johnseiler5668
      @johnseiler5668 8 днів тому

      Started from scratch and now it works.

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

      NICE!!! Did you also figure out where things went sideways the first time as a result?

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

    I created an Actor BP and added inside it an empty static mesh. I create 4 children from this parent actor BP and connected an actor to the static mesh so each child has a different geometry.
    I went back to the parent actor BP and created a variable Array of class Reference. I want my child actor meshes to appear in the viewport. When I drop my parent actor BP in the scene, nothing shows up. I did what you show here to call my array but how do I make the actors visible?

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

      Did you set the static mesh in the parent? you won't see anything if the parent doesn't have a default mesh. If you drag your children into the scene they should have the meshes you selected

  • @user-hehhe
    @user-hehhe 15 днів тому

    which nodes is mastermind behind the radius you put 10000000 ?

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

      Im not sure I totally undrestand the question, but we make it super big so that the very first comparison always succeeds

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

    When I try to get a "Return node" for the for loop it doesn't show for me.

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

      Im not sure what this means. For loops themselves don't have return nodes. Can you either give me a time stamp or a little more info

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

      @@livinfreestyle6727 I was doing all this in the Construct function and not creating a new function so when I tried to make a return node it wouldn't let me xD. Another thing I did wrong was a I made a new Blueprint and not do all this in the ThirdPersonCharacter blueprint. which makes me want to ask: can I make a blueprint for "DetectCoin" and then somehow call back to it in the "ThirdPersonCharacter " Blueprint?

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

      Yes you can ...Im filling in the gaps here, but todays live stream is going to cover a few different ways to detect things. Once you figure out "how" you are going to detect then calling back to the thirdPerson, my favorite method would be Blueprint Interface (check out the Blueprint Interface demystified video), but you could also cast

  • @63OO
    @63OO 4 місяці тому

    for some reason i can't connect (Set Object to For each loop ) @8:16

    • @63OO
      @63OO 4 місяці тому

      i restarted for each loop by deleting it and it all working fine ty.

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

      nice self solve! Sometimes if you drag off a pin for a for loop, then change the variable you have to redo the for loop. or sometimes unreal is just weird

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

      @@63OO Thank you for sharing. I was having the same problem :D

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

    Nice, I feel like the main thing that I might need help understanding (since I am understanding the modifying bp's) are the deferent type of blueprints and their use. I just started understanding the projectile one a little better and how to make modifications and to only allow certan shooting modifiers in trigger boxes but I am trying to shoot for a noita cell gun building thing and I cant really figure out how to modify it like how I want. To my understanding, functions are like a shortcut and modifier to custom events, so I thought I could make like 'spheres' with functions on them to modify the 'wand/gun' that the vr hand is holding if I put like 'squares' to hold them and add them to it, to change what the projectile does, but I dont know what would be needed blueprint wise to do that. . . . I do understand I would need like 4 separate bp's (gun/wand, projectile, square socket/holder, sphere modifier/socket insert) and like however many modifiers I would want to make for the projectile right? Amazing video as always, I love seeing other blueprints being used like the set timer by event, i could see me using that for a health regeneration item.

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

      I'm am working to wrap my head around where the fog of war is for you. It almost sounds like you might benefit from a "broader" understanding of the typical order in which things, happen, uses or standard procedures for implementing ideas, and how they all glue together. Let me know and maybe we can figure something out.

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

      @@livinfreestyle6727 yeah I would like something like that, like a 'standard optimized way' I dont know if it is a thing but could I make a array of functions and call upon them? So if I made a function to chose how powerful a projectile modifier is (like it has either a chance to be a add 1 projectile, or multiply the ammount of projectiles shot by 2) but it has a random chance to be one or the other when picked up (lets say add 1 is green/uncommon and multiply by 2 is a blue /rare)

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

      what you are describing sounds like a combination of an "Item system" and an ability system. Items drop and have a chance at a certain power. When you pick that item up it gives your abilities additional power, or even gives you abilities. This can all be driven by loot or drop tables combine with how your character actions/abilities are implemented

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

      @@livinfreestyle6727 Yes you are right on point. I would like to focus more on the wands having the effects (more like the wands could store the 'spells') more than the player but it would be a good learning lesson for me to get to know how to do things like that for perks and such.

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

    I tried to recreate this without copying 1 to 1 to test if i learned, i got almost identical steps but i got the weirdest bug, if i use the debug sphere outside the function as you did on the video it triggers on one actor and never changes keeps retriggering it every 2sec as set on the "set timer by event" (isn't even the closest one) and if instead i put the debug sphere inside the function at the end it kinda works but it triggers multiple "closest" actors as if somehow "set actor" local variable is being more than one thing at the time, have any idea what might be happening?
    Sorry if my explanation it's too convoluted, english is not my first language.

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

      Do you have Looping check in your Set Timer by Event when it is outside the GetClosestObject function? Because since it is being linked to BeginPlay it is happening only once by default, when you tickt Looping option in Timer it happens every 2 seconds regardless of where it is linked (i think)

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

      can you post your question in the discord forums so you can share a pic of your blueprint. That would help

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

      @@kremuwczan Yes, it is looping, i will try as soon as i can to recreate exactly what i did in a clean setup because the one i did had other things i was testing, so if the bug persists i will post on the forums, this really is not a big deal but what bugs me is i can't see why this is happening, it should work.

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

      @@livinfreestyle6727 I've managed to find what the problem was, i wasn't calling the "debug draw sphere" on the completed segment of "for each loop", it was being done on the "Loop Body" that's why i was having confusing results.

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

      @@jurusco awesome! way to self solve

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

    I don't understand why we have to set the variable to1000000, every number I get from the Distance(vector) is less than it, that means Branch does the truth every time, which doesn't make sense at all, also how do we put 4 numbers into single varibales,I'm sure there's something I don't understand. I hope you can help me.

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

      can you help me out with a time stamp so I can better look at where the confusion might b?

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

      @@livinfreestyle6727 In this episode we set the Closest distance so far variable to 10,0000, and every distance calculated by Distance(vector) is less than 1,000,000, so this Branch node executes the truth every time why don't we just set this Branch node to true and execute it, but I've tried and it doesn't work, so I'm very confuse

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

      @@livinfreestyle6727at 6.40

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

      Ah...ok. So the reason is. At 7:49 we check to see if the current distance is less than our ClosestDistanceSoFar. Each actor we check, if it's closer we we update the ClosestDistanceSoFar so that we get closer and closer. If that part is clear, then we need to talk about the FIRST time through though, what is the value of ClosestDistanceSoFar? Cuz that is what we are comparing against. We don't have another "branch"....so we make the ClosestDistanceSoFar ARTIFICIALLY super far away. That way any distance we check is closer. It sort of kick starts the engine. Another way we could achieve this is to put in a separate test "Is this the first time through the loop" If so, don't compare and set the ClosestDistanceSoFar to the distance of the first item.
      Hope that helps

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

      @@livinfreestyle6727 Thank you very much. I'll check it tomorrow

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

    Hi dear, I have 2 questions 1, I started learning ue and I started with fundamental...

  • @stefans3780
    @stefans3780 11 місяців тому +1

    Very helpful and beautifully explained, as always. Thanks!

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

      Thank you! It'll be interesting once we finish these three if you all think it should have been one video or separate.

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

    great teaching sir!

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

    Many thanks ✌🏻✌🏻✌🏻🙏🏻🙏🏻🙏🏻

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

      you are cranking through these videos!!

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

      @@livinfreestyle6727 … and happy that you are present in comments in the process 😊🙏🏻🙏🏻🙏🏻

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

    I'm far from the first person to say this, but just wanted to add my thanks for making such incredible videos. I'm a game writer with some basic coding knowledge that I'm looking to expand as I learn my way around Unreal for the first time, and while other tutorials have covered some basics, the way you explain blueprints and tie them to actual gameplay examples is the best and most in-depth I've seen. Also love the way you talk about variables - will definitely be borrowing that bucket metaphor the next time I'm teaching branching and variable tracking to folks from a non-technical background.
    You're a fantastic teacher, and I really appreciate you putting in so much work to share your knowledge with other developers out there. Looking forward to getting through the rest of this video series :)

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

      Thanks Olivia for taking time to drop feedback. I'm glad the teaching style works so well for you. AND thanks for watching too!

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

      I echo Olivia's sentiment! Would love to see a more narrative focused tutorial~

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

      @@michaelluo5619 like narrative design?

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

      @@livinfreestyle6727yeah! like dialogue systems