Learn to Code in UE5 - 14 - Interfaces

  Рет қаралды 10,373

Coqui Games

Coqui Games

Күн бұрын

Пікірлер
@CoquiGames
@CoquiGames 2 жыл бұрын
Hey everyone, for this lesson I created several BPs to show how to use Interfaces. You can download the project here to get access to these Blueprints and follow along - www.mediafire.com/file/kzao9t94c5bx5da/LearnToCodeUE5_Interfaces.zip/file
@Studio1XN
@Studio1XN 2 жыл бұрын
Thank you Sir!
@Tenchinu
@Tenchinu 2 жыл бұрын
thank u! I was totally lost on this. Thought we had to create the assets ourselves to follow along. great help :)
@CoquiGames
@CoquiGames 2 жыл бұрын
@@Tenchinu Glad to hear it :)
@no_SKape
@no_SKape 9 ай бұрын
Hey, im currentling binging your series and wanted to let you know, that the door bp is almost empty. Reason might or might not be, that something goes wrong while transitioning into the new UE version, but maybe you want to recreate the Projekt in 5.3? Wouldnt mind if you`d show the full code in your vid, but you only see the custom events.
@tonyvaldez1040
@tonyvaldez1040 2 жыл бұрын
This series is a god send
@CoquiGames
@CoquiGames 2 жыл бұрын
Thank you Tony! Very happy to hear it :)
@123SriNat
@123SriNat 10 ай бұрын
This series is awesome! Teaching slowly with a great voice is very effective to follow along and practice. Please do more tutorials.
@CoquiGames
@CoquiGames 9 ай бұрын
Thank you!
@jurvanoerle2845
@jurvanoerle2845 11 ай бұрын
This is a great series for programming in general
@CoquiGames
@CoquiGames 11 ай бұрын
Thank you!
@universalsoldier27
@universalsoldier27 9 ай бұрын
Amazing tutorial. I decided that I would build the blueprints myself for extra practice which helped a ton with debugging things that I found. I had forgotten to connect the animation timer on the door, so it didn't open. Then I got it to open but didn't set the frame to be overlap only so it was an invisible wall. Then I had some troubles with the lights but eventually figured those out and got it all working. One thing I noticed is that when using a box collision on the player character; it and the player character itself can overlap the boxes for the lights/door/switch which causes it to flicker off/on running the code once for each overlap. I suppose putting a retriggerable delay on the execution would stop this flicker from happening but normally we use the interact key to cause these effects to take place. So I may decide to set each light to toggle visibility when it is interacted with instead of setting the *ability* to turn it on/off by approach. Again this has been the most useful tutorial I've followed that is teaching me the core concepts of creating games at a wonderful pace. You don't seem to waste our time while still teaching us why we do things in a specific way.
@universalsoldier27
@universalsoldier27 9 ай бұрын
I went with another tutorial's door interaction which uses both sides of the branch node where True can mean the door is closed (canOpen) and plays the open animation. Then False would be that the door needs to close. I chose this over the forward and backward door open animation because typically the hinges are only on one side of the door meaning it can't swing back and forth (though there are some that do). In any case since I was trying to figure out how to get it to close automatically after opening and I ended up using a retriggerable delay of 5 seconds in case you play with the door (interacting a bunch). So once it finishes the animation it waits 5 seconds of not playing with the door before running the close door animation (originally I had 2 seconds but increased it so that it didn't shut while walking through right after playing with the door). First it checks if canOpen is False, then plays the door animation event which picks the close door branch and after the delay it is already closed so it doesn't repeat forever. I did experiment with not having that boolean check so I had a haunted door for a minute :D
@JoeyPark18
@JoeyPark18 Жыл бұрын
It might seem obvious now but if you are trying to recreate the blueprints yourself, such as the door, make sure you do not make the trigger front/end a child of your door. I spent a good hour trying to figure out why my door was acting weird - triple checking my nodes, adding a "Cast To BP_ThirdPersonCharacter" to "Component Begin Overlap", copying Coqui's nodes 1 for 1, etc. Until I realized that my overlap boxes was rotating with the door... smh
@Timfirki0
@Timfirki0 Жыл бұрын
Lol yeah I did this too, spent way too long trying to figure out what was going wrong
@RandomPhail
@RandomPhail 11 ай бұрын
does child just mean "attached to the door model" in this case? Because I haven't set my door to be parented by the bounding boxes or anything, but the bounding boxes are definitely with the door blueprint, lol
@d.k.1545
@d.k.1545 2 ай бұрын
im late to the party here, but great advice! It helps setting these elements to visible inside of the game when testing...
@ojeabuoosaimi6703
@ojeabuoosaimi6703 Ай бұрын
I'm not going to lie but I think I have a problem because I keep feeling sleepy while watching this your tutorials. I'm confused. But all in all great work sir, I'm going to fight the sleep and finish the course this week. Probably go through it again for the things I missed.
@CoquiGames
@CoquiGames 19 күн бұрын
Sometimes it takes going through the lesson multiple times until things stick - dont give up!
@TaksharyaSinghJasrotia
@TaksharyaSinghJasrotia Жыл бұрын
I have come across a question. Like when in game we overlap a volume which is interactable it hovers a key sign shows to interact with the scene like open a door and stuff what criteria is most commonly used to check the other actor overlapping with the volume is our player? Does it check its tag? Or its base class? Or what is the common practice?
@TaksharyaSinghJasrotia
@TaksharyaSinghJasrotia Жыл бұрын
I asked chatgpt and showed me a bunch of ideas and the one I liked the most is setting colision channel to ignore all collision except of our main player.
@CoquiGames
@CoquiGames Жыл бұрын
@@TaksharyaSinghJasrotia You got it! usually a tag, class, or whether it implements an interface (that only the Player character uses). It all depends on your design.
@razahmohamed1849
@razahmohamed1849 Жыл бұрын
hello again. i have a question. in the bp_door event graph there is an event called Event In Active at the bottom. where is this event from. is this an custom event? or is it the parent class (actor) preset that all children classes with the actor as parent can call.
@razahmohamed1849
@razahmohamed1849 Жыл бұрын
i kinda downloaded all the assets. copy pasted into my blueprint folder of the project that ive been using since lesson 1 of this course . deleted all nodes that were goin to be taught in this video. maybe i missed one lol. i may have figured it out. idk.
@bharathbelligowdan5105
@bharathbelligowdan5105 2 жыл бұрын
Again...the best one!!! 😀
@ceryx6849
@ceryx6849 3 ай бұрын
I'm trying to make that switch for the ceiling light. But my reference is apparently broken yet i set the type to BP_Light, and BP_Light looks the same as yours ecept for some things i can see in your details and variable tabs. I can't figure out why you have light variables category and light options on the details panel of the BP_Light actor root. I probably shouldn't, but its been 3 hours i'm messing with stuff trying to find a solution so i can properly follow this video course. Edit : much more time now. I have to give this up and DL your project i guess :( Edit : Several days after, i figured out you've made a structure for Light Options and probably set some code into the construction script for the lamps and that's why your activator could access the different parameters (like on and off). And that i actually had to set the reference as Instance editable so i could attribute them to the editor in the details tab of the viewport. I still have an issue i'm not able to solve : Most of the time my references can't be accessed from other actor blueprints and i get a "none tried to access [ref]" error when they actually need to while testing. So basically for now i'm stuck with casting stuff, but i'm following other Blueprint tutorial series and practicing so it will finally click at some point.
@CoquiGames
@CoquiGames 2 ай бұрын
Hey there, can you post on our Discord so we can help. This way we can look at screenshots, etc :)
@mdarju6498
@mdarju6498 3 ай бұрын
Thanx a lot Boss...
@huntermcintyre4822
@huntermcintyre4822 Жыл бұрын
soooo an interface is like an event that can be called in different ways in different locations?
@jurvanoerle2845
@jurvanoerle2845 11 ай бұрын
An interface can be seen as a contract that is signed by a blueprint or class, obliging it to implement a specific function. It doesn't specify what should happen when this function is called, just that it must exist. Because it doesn't have a specification, it could do very different things for different objects (as seen in the video). Another example of using an interface: a monster attacks the player. It could jump, run, morph, yell, or do any kind of behavior.
@jurvanoerle2845
@jurvanoerle2845 11 ай бұрын
Another great advantage is that a class can implement any number of interfaces, but can only inherit from a single other class.
@mxneymit3757
@mxneymit3757 10 ай бұрын
I dont have the interface folder under blueprint. Is it something Im supposed to make or should it be there by default? Im stuck
@FulcanMal
@FulcanMal Жыл бұрын
When I make the 'Set Relative Rotation' node, it doesn't have three separate pins for each axis (X,Y,Z). Instead it has a single pin for all three axis (which the Lerp node's return value is not compatible with), a Sweep boolean pin, and a Teleport boolean pin. (Nevermind, discovered I can right click on the axis pin and 'Split Struct')
@eguerra4001
@eguerra4001 Жыл бұрын
I’m new to all of this and I’m learning a lot, thank you. Sorry if this is a dumb or remedial question, but if interfaces are this powerful and so inexpensive, why ever use cast? I’m sure it’s probably a very simple answer however I’m an extreme newby.
@ProjectOniricDEV
@ProjectOniricDEV Жыл бұрын
Would like to know too
@CoquiGames
@CoquiGames Жыл бұрын
@@ProjectOniricDEV Its an easier setup, but the biggest reason is getting access to the Actor's data and functions. Say you cast to the BP_Player - the reference will give you access to all the player variables and functions / events. On the other hand, an interface is more about a fire and forget functionality.
@ProjectOniricDEV
@ProjectOniricDEV Жыл бұрын
@@CoquiGames Thus making it more optimal and saving FPS?
@CoquiGames
@CoquiGames Жыл бұрын
@@ProjectOniricDEV If you use casting on a BP, the object that is casted will also be loaded into memory (even if not called directly). This can create a cascade effect where loading your level requires you to load lots of BPs at the same time. This consumes memory and makes loading slower.
@rancheraosborne
@rancheraosborne Жыл бұрын
​@@CoquiGamesIf your character for example is always loaded and in screen, wouldnt it be okay to cast it all the time from different objects since it is already loaded? Or casting in this case makes it cost per cast?
@DKJens44
@DKJens44 2 жыл бұрын
Thank you ;)
@CoquiGames
@CoquiGames 2 жыл бұрын
You are very welcome :)
@GamesAndAI1308
@GamesAndAI1308 8 ай бұрын
soo Interfaces is just like direct actor communication but instead of creating a parent class we create an interface blueprint.
@stainohh
@stainohh 10 ай бұрын
I downloaded your blueprint and the door is passable. I tried blockall collision on the door and it is still passable. using unreal engine 5.2
@CoquiGames
@CoquiGames 10 ай бұрын
Hey there, please join our Discord so we can help you :) discord.gg/vJVa9xk
@АнтонЛютиков-в9р
@АнтонЛютиков-в9р 9 ай бұрын
Hi! Have you found a solution to this problem?
@CynderYT
@CynderYT 8 ай бұрын
@@CoquiGames I am encountering the same problem and i am not allowed discord, can you post the solution here please?
@cheesebetweentheknees
@cheesebetweentheknees 6 ай бұрын
@@CynderYT For those who may need this info in the future, the Statis Mesh for the door located in the Started Content - Props folder doesn't seem to have good collision applied to it...or perhaps no collision at all. I tried to apply a collision box to the BP which didn't work, so I went to the Statis Mesh itself and applied a collision to that and now it is working. Add that collision to the static mesh and you will be good to go :)
@CynderYT
@CynderYT 6 ай бұрын
@@cheesebetweentheknees Thank you
@riceroll
@riceroll Жыл бұрын
For those wondering why your lights are flickering (Flip Flopping at the same time) when you overlap your lights, you have to turn off "Generate Overlap Events" of your ThridPersonCharacter's Capsule Component (CollisionCylinder). For some reason, this collision component activates when you begin overlapping. This is either a bug or I did something wrong! :)
Learn to Code in UE5 - 15 - Event Dispatchers
18:17
Coqui Games
Рет қаралды 7 М.
CoquiGame's 2024 Plans - what do you think?
16:49
Coqui Games
Рет қаралды 641
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Unreal Engine - Blueprint Interfaces Tutorial
6:14
Beardgames
Рет қаралды 56 М.
I Struggled With Blueprint Interfaces for Years!! (Unreal Engine 5)
16:48
Glass Hand Studios
Рет қаралды 195 М.
Learn to Code in UE5  - 13 - Direct Actor Communication
36:45
Coqui Games
Рет қаралды 11 М.
How to take Metahumans to the NEXT LEVEL ! (Unreal Engine 5)
7:06
Cinecom.net
Рет қаралды 185 М.
Learn to Code in UE5  - 12 - Collisions and Overlaps
28:47
Coqui Games
Рет қаралды 12 М.
Blueprint Interfaces | Unreal Engine 5 Tutorial
14:41
Tyler Serino
Рет қаралды 62 М.
5 Tricks you (probably) don't know about Unreal Engine 5
10:44
Cinecom.net
Рет қаралды 407 М.
Unreal Engine - Advanced Animation: Socket IK
12:14
Unreal DevOP
Рет қаралды 901