Тёмный

Unreal NPC Characters - UE4 Open World Tutorials #44 

CodeLikeMe
Подписаться 90 тыс.
Просмотров 30 тыс.
50% 1

Project files : / 23998422
In this episode, I will add a NPC (non player character) to our game. This character will be inherited from the same Ch_Human character blueprint we used to create the player character. I will add this character a simple AI behavior so that character will select a random point in the reachable radius in navigable area and walk. The AI blueprint will be extended from detourAIController. Also, the NPC characters will either walk, run or crouch randomly.
► 👇 𝐒𝐮𝐩𝐩𝐨𝐫𝐭 𝐓𝐡𝐞 𝐂𝐡𝐚𝐧𝐧𝐞𝐥 // 𝐁𝐞𝐜𝐨𝐦𝐞 𝐀 𝐏𝐚𝐭𝐫𝐨𝐧!
/ codelikeme
►Patrons will have access to project files of all the stuff I do in the channel and other extra benefits
Full open world series playlist : • Unreal Open World Tuto...
Like my facebook page for more content : / gamedevelopersclub
Follow me on twitter : / codelikeme2
Follow me on reddit : / codelikeme
#CodeLikeMe #unrealengine #ue4 #indiegamedev

Опубликовано:

 

1 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 98   
@dylankelly8049
@dylankelly8049 5 лет назад
This guy deserves a million bucks for his unconditional help.
@HumiIiation
@HumiIiation 5 лет назад
Love your videos man, I have started following this since I am primarely a modeller and not a programmer. Thanks for putting this up and making my dreams of creating my own game one day a bit closer to rality :)
@lamprosgiannopoulos8489
@lamprosgiannopoulos8489 4 года назад
Once again fantastic tutorial.
@imavegangaming6744
@imavegangaming6744 Год назад
an absolute genius!!
@addisonwarner
@addisonwarner 4 года назад
LOL I started laughing so hard at 14:48 when he just started running
@kimnorth7060
@kimnorth7060 5 лет назад
nice, you can also use behaviour trees and blackboard to get a similar type of behaviour
@kacperpacocha8758
@kacperpacocha8758 5 лет назад
if my character is now a child how i can edit basic movement ??? pls help
@giorgioguglielmone6528
@giorgioguglielmone6528 3 года назад
If you want to use another character as an enemy (always downloaded from mixamo), it is not only enough to change the skeletal mesh (putting the new character), you must also redefine the Blueprint Animation on the new character, otherwise it always results in Tpose. Or is there another way ?
@giorgioguglielmone6528
@giorgioguglielmone6528 3 года назад
I did not understand who starts (which node) the animation of the running, walking of the enemy
@bryeazy1639
@bryeazy1639 3 года назад
I Need your HELP the event error is now Gone after we fixed the JUmp but the Character will not land anymore it is now stuck at the landing animation Im using version 4.26.
@kailashnath5208
@kailashnath5208 3 года назад
hey..i want to change the npc character and its animation so that they don't look the same as the player. how can i do that..... pls help
@rajenderjaisinghani
@rajenderjaisinghani Год назад
Whenever AI touches the main character, then there is this weird camera zoom in? Is anyone facing this issue? Let me know how to solve it
@geoffrey3668
@geoffrey3668 5 лет назад
Great video! I just notice the player is not moving the grass anymore, but the pawn does.
@CodeLikeMe
@CodeLikeMe 5 лет назад
can you explain this issue a little more, I need to check.
@lickafof2524
@lickafof2524 5 лет назад
I have the same problem, the interaction with the grass working only with the NPC ! Can you help us to fixe that, please. Thanks
@sarahstelljes907
@sarahstelljes907 4 года назад
I did exactly as you did (or at least I'm pretty sure I did), but my Player character's animation won't work. I'm using 4.24 for my project so it's probably different from what you used in the video. I think the problem is the animation blueprint won't cast to the Player character. Do you know how to fix this?
@sarahstelljes907
@sarahstelljes907 4 года назад
Nevermind, I don't think it's what I thought it was... either way, my player character is moving, but it's stuck in idle, and yet the anim class is set to my animation blueprint.
@megtwin
@megtwin 5 лет назад
Is it possible for you to do a video of adding an NPC that doesn't have the same skeletal structure as the knight?
@CodeLikeMe
@CodeLikeMe 5 лет назад
Sure
@louisdyster181
@louisdyster181 4 года назад
Was there any update on this happening?
@vern79791
@vern79791 2 года назад
Tried this tutorial but not sure why nav mesh bounds volume can't work in my persistent level. Even though changed navigation mesh into dynamic, anyone know why ?
@CodeLikeMe
@CodeLikeMe 2 года назад
Not sure
@yozzahughes3939
@yozzahughes3939 5 лет назад
Loving this series so much man thanks you need a medal. had no issues so far about from at the end of this video :( my NPC just runs..... and when im adding the togglecrouch and togglerun in the AI_Human its says "Using Interface SKEL_BPI_Character_C" Any ideas what ive done wrong ive followed it through twice now, thanks again
@CodeLikeMe
@CodeLikeMe 5 лет назад
I'm not clear, could you send an screenshot of that part
@yozzahughes3939
@yozzahughes3939 5 лет назад
@@CodeLikeMe send you msg on Facebook dude thanks
@lucasweber5104
@lucasweber5104 5 лет назад
I am using a different character model/mesh. My AI is just sliding and not using the animation. Can you help me? @CodeLikeMe
@CodeLikeMe
@CodeLikeMe 5 лет назад
Did you assign a anim blueprint to your model?
@lucasweber5104
@lucasweber5104 5 лет назад
@@CodeLikeMe I was able to figure it out. I needed to change the Velocity settings(Its a Paragon Asset)
@louisdyster181
@louisdyster181 4 года назад
How have you got this working? I'm trying a similar method - but my AI is unable to attack for example at the stage i'm at. Did you get this to work fluently?
@matiascasag
@matiascasag 4 года назад
Nice but you could use the same Ch_Human class for Player and AI you just need to spawn the Ch_Human class, spawn the AI Controller and then use the Possess function to assign the AI Controller to the Ch_Human class.
@CodeLikeMe
@CodeLikeMe 4 года назад
Possible, actually they are child classes of same class. I didn't want to put components such as camera to other enemy classes that wouldn't be used. That's why I decided to create separate child classes for npc and player. But common things are implemented in main parent class and inherited
@TolisPiperas82
@TolisPiperas82 4 года назад
If we want to replace a mesh character with another mess in which blueprint (bp human,bp character...)will replace?
@CodeLikeMe
@CodeLikeMe 4 года назад
You have to retarget the animation blueprint and then can use that new mesh. Refer to "how to replacecharacter" tutorial I did
@TolisPiperas82
@TolisPiperas82 4 года назад
@@CodeLikeMe have you made a tutorial for it?
@robylplays
@robylplays 4 года назад
tells me that there is an error in the input of toggle run M here is the error code : Infinite Loop Detected. what am i supposed to do im trying hard to fix it nvm i had to rewatch these two parts again it was a bug that was in unreal
@CodeLikeMe
@CodeLikeMe 4 года назад
ah, yes, i think i fixed it in a later episode
@megtwin
@megtwin 5 лет назад
These are awesome! I noticed that now our player char no longer has the grass effect, and the AI does. How do I fix that?
@CodeLikeMe
@CodeLikeMe 5 лет назад
Somewhere I update the character location of the mp_global, do it only for player
@stevendesilets9796
@stevendesilets9796 5 лет назад
@@CodeLikeMe I have the same problem as megtwin , but i cant find where your change the location of mp_global , only one AI can move the grass, no two at the same time?
@stevendesilets9796
@stevendesilets9796 5 лет назад
I was able to fix it by putting getplayercharactrer as a input for the getactorlocation for the subtraction of the vector for the capsule height..seem to work so far! Thank
@megtwin
@megtwin 5 лет назад
@@stevendesilets9796 Thanks!!
@stevendesilets9796
@stevendesilets9796 5 лет назад
@@megtwin np! :)
@theoexcille6749
@theoexcille6749 5 лет назад
Hey ! Nice video but why not using a behavior tree ? :)
@CodeLikeMe
@CodeLikeMe 5 лет назад
yes, I should revamp the AI with behavior trees
@marxmarjoneljovellano4091
@marxmarjoneljovellano4091 4 года назад
Hi CodeLikeMe, I've been your fan and I've always watched your videos when researching techniques. I've tried this tutorial before and it really worked for me then I tried to work on something else. Now I've gone back on working again on my ai but now it stopped working. I have my nave mesh, my controller class for my character is correct and my blueprints are correct. I'm really stuck and wondering if you could help me?
@marxmarjoneljovellano4091
@marxmarjoneljovellano4091 4 года назад
I've posted this on UE4 Forum if you need pictures answers.unrealengine.com/questions/961794/ai-navigation-worked-but-now-is-not-working.html
@marxmarjoneljovellano4091
@marxmarjoneljovellano4091 4 года назад
I've solved my problem, but I don't understand the logic. I just moved my Navmesh to origin (but above the landscape) and the AI Moved. I'm not entirely sure why it worked. Hope you would know?
@marxmarjoneljovellano4091
@marxmarjoneljovellano4091 4 года назад
I've realized that my above solution (moving to origin) isn't the one that solved my problem since it still persists on my original file. I actually made a new 3rd person template, then copy pasted the actual folders (in windows file explorer) to the folder of the new 3rd person template and it worked perfectly.
@iamakilahamed3776
@iamakilahamed3776 4 года назад
@CodeLikeMe I got a doubt. Let's say there are 2 classes; parent class and child class. Is it possible if I can make the child class not the child of the parent class?
@CodeLikeMe
@CodeLikeMe 4 года назад
then it wouldn't be a child class. just another class. it won't have the inherited variables or functions of the parent
@iamakilahamed3776
@iamakilahamed3776 4 года назад
@@CodeLikeMe oh then it will lose all it's inheritated properties. Ok thank u for the clarification 😊
@iamakilahamed3776
@iamakilahamed3776 4 года назад
If thats the case then how to use a different skeletal mesh for the ch_enemy and also at the same time have the functions and variables in the ch_human class
@Ahshitherewegoagain
@Ahshitherewegoagain 4 года назад
I have a problem Nav mesh bounds volume is not working. Press the P button many times but it does not show green color on the floor at all. Please NPC characters are unresponsive. 😭😭😭😭
@Ahshitherewegoagain
@Ahshitherewegoagain 4 года назад
I have to hurry to create a game to attach to the portfolio Send to university
@CodeLikeMe
@CodeLikeMe 4 года назад
Can't say what's the exact issue without checking the code
@seansopata5121
@seansopata5121 4 года назад
A few things: 1) Are you sure your nav mesh volume is actually covering the ground? 2) If you can't figure this out, I'd suggest NOT trying to enroll in university (and spending thousands of dollars), as things are going to get sooooo much more complicated. 3) Just copying someone elses hard work (these videos) and passing it off as your own for a portfolio is really not very good.
@bercouli4855
@bercouli4855 4 года назад
iam confused where did you get the toggle run and toggle walk from??
@leventetoth3919
@leventetoth3919 4 года назад
previous videos
@franklittle645
@franklittle645 4 года назад
@@leventetoth3919 I'm having a similar issue...I watched the earlier ones as well--only skipped the some of the landscape ones--so can you be more specific if you remember which video he set it up in...I have a feeling its an interface issue....
@leventetoth3919
@leventetoth3919 4 года назад
Frank Little its in the character movement video
@franklittle645
@franklittle645 4 года назад
Levente Tóth I’ve jus rewatched all the first videos-up till he switched to focusing on landscapes-and I see now my issue is somewhere else....in fact I just starred all over again because, on my previous project I’d also used a different tutorial series to set up a separate character....I think things just got confused between the two so I figured it was best to just follow one until I’m more comfortable with the overall process....thanks for the quick reply!....
@kanavkrishan4922
@kanavkrishan4922 3 года назад
It's in the 3rd or 4th video
@franklittle645
@franklittle645 4 года назад
At 12:40 you use a node called "get controlled pawn".....I don't seem to be able to access that node; I'm using version 4.24.3....
@CodeLikeMe
@CodeLikeMe 4 года назад
that's a default node, try removing the context sensitive tick when you right click and see if you can get that
@franklittle645
@franklittle645 4 года назад
@@CodeLikeMe I've tried that as well....I'm at a loss because I know I've used the node before and I don't understand why it just isn't available suddenly....I also tried on my other computer where I'm running version 4.25 and it's just not there....
@franklittle645
@franklittle645 4 года назад
@@CodeLikeMe Ok, I believe I figured it out....I was in the wrong blueprint....
@UnrealogyTutorials
@UnrealogyTutorials 5 лет назад
When i do the get controlled pawn thing, it says :- The blueprint (self) is not a controller therefore *target* must have a connection I am so frustrated i followed everything this guy said
@CodeLikeMe
@CodeLikeMe 5 лет назад
Where did you try to use that node?
@UnrealogyTutorials
@UnrealogyTutorials 5 лет назад
@@CodeLikeMe sry never mind I got it lol I am so dumb as to use it in the character blueprint.... instead of the controller
@TheVorlecGame
@TheVorlecGame 4 года назад
@@UnrealogyTutorials what did you do? having the same problem
@UnrealogyTutorials
@UnrealogyTutorials 4 года назад
@@TheVorlecGame Dont use the node in the character blueprint, do it in the controller blueprint
@UnrealogyTutorials
@UnrealogyTutorials 4 года назад
@@TheVorlecGame I saw ur vids. U are also working on an open world game. Wanna collab? We can make a game together
@discocat9431
@discocat9431 2 года назад
my AI doesn't work at all. Nothing happens when I press play...
@jeyburns.t9209
@jeyburns.t9209 Год назад
Same here. I started fresh in a new 3rd person template project and pasted all folders in windows explorer. No change
@jackmann1478
@jackmann1478 4 года назад
17:26 No toggle run option was available, only a toggle crouch message.
@CodeLikeMe
@CodeLikeMe 4 года назад
Add it to bpi_character interface
@jackmann1478
@jackmann1478 4 года назад
@@CodeLikeMe Got it, thanks
@idtssourav3551
@idtssourav3551 4 года назад
I Inherited CH_Player character from CH_Human class then Assign The AI_Human controller to the CH_Human class and select CH_Player as default player then i CH_Player is working correctly but when CH_Player moves at the same time CH_Human also player the Walk-run-sprint animations staying at the same place.. Can't find the solution of this. Waiting for your reply.. Thanks :)
@theunrealguy8590
@theunrealguy8590 4 года назад
Bro did u solve it??
@idtssourav3551
@idtssourav3551 4 года назад
@@theunrealguy8590 Nope.. I still can't find the solution.. so I had to make a completely new character.. for enemy ..
@theunrealguy8590
@theunrealguy8590 4 года назад
@@idtssourav3551 u just changed the charecter mesh or whole new bp for enemy?i mean no child bp for enemy?
@idtssourav3551
@idtssourav3551 4 года назад
@@theunrealguy8590 whole new bp.. cuz child bp is not working for me.. child character doesn't move while the main player character (parent class) moves .. but at the same time it playes the same animation that's played by the player character but staying at the same position..
@theunrealguy8590
@theunrealguy8590 4 года назад
@@idtssourav3551 thanks a lot bro...i stuck in this step for severel hours.....and bro if u need any ue4 paid asset free then knock me....u are so kind..so i will help u too
@raulhidalgo2167
@raulhidalgo2167 5 лет назад
The animations don't work help plis
@CodeLikeMe
@CodeLikeMe 5 лет назад
Need more information to help
@raulhidalgo2167
@raulhidalgo2167 5 лет назад
I solved the problem
@architect9972
@architect9972 4 года назад
@@raulhidalgo2167 how did u solve it becouse am having the same problem
4 года назад
fixa el jump
@dev_mumu6604
@dev_mumu6604 2 года назад
i Don't know why. it' doesn't work..
@CodeLikeMe
@CodeLikeMe 2 года назад
can't say why without details
@jackmann1478
@jackmann1478 4 года назад
I still get an infinite loop when I jump even after changing the BPI function name.
@jackmann1478
@jackmann1478 4 года назад
NVM, fixed
@shaezbreizh86
@shaezbreizh86 3 года назад
@@jackmann1478 how ?
@shaezbreizh86
@shaezbreizh86 3 года назад
@@jackmann1478 NVM, fixed xP i didn't watch carefuly
@kanavkrishan4922
@kanavkrishan4922 3 года назад
6:41 (bookmark).
Далее
Как пронести Конфеты В ТЮРЬМУ
19:16
Аминка ❤️
00:16
Просмотров 772 тыс.
Unreal Engine 5 - NPC - Idle
11:48
Просмотров 3,8 тыс.
Unreal Engine Simple NPC Tutorial
14:03
Просмотров 56 тыс.
Unreal Engine 5 - NPC - Free Roam
11:31
Просмотров 5 тыс.
Как пронести Конфеты В ТЮРЬМУ
19:16