NPC Spawner Part 3 : Behavior tree, use pawns without a player state ue5 Lyra
ฝัง
- เผยแพร่เมื่อ 10 ก.ค. 2024
- Setup NPC or AI that doesn't need a PlayerState. Set their color, set their behavior tree. In this tutorial we'll setup a basic NPC that just jumps every 3 sec, can be damaged, respawns.
This is the way I chose on my project, it's very customizable. Great to see my AIs coming to life!
Part 1 at : • AI spawner for Lyra : ...
Part 2 at : • Create teams for NPC :...
Code at GitHub folder: github.com/NanceDevDiaries/Tu...
Engine: Unreal Engine 5.2
Project base: Lyra Starter Game
Floating AI movement market place awesomeness at : www.unrealengine.com/marketpl...
Join my Patreon to get video credits and if you'd like to give thanks!
/ nancedevdiaries
Thanks for watching!
---------------
Timestamps:
00:00 - Intro
01:35 - Setup the code : controller and pawn with abilities add
06:42 - On spawned NPC for blueprint implementation
08:19 - Code's end, setup your bouncy NPC!
13:27 - Marker 5
19:05 - Setting a behavior tree, make it jump every 3 sec
26:15 - Outro
I have fixed the issue where the clients don't respawned and updated the github code! Took me a little while but was very satisfying to see Clients respawning! Here's the commit with the changelist (just moved 2 lines) github.com/NanceDevDiaries/Tutorials/commit/d0fb0db0bc420204bd0e00b112adc1c312740e1d
Fantastic work! Thank you for walking through your solution for making NPCs without player state. Exactly what Lyra needed to start making it more useful for devs. Epic should offer you a job today.
Thank you for those insightful videos on the Lyra system. That series helped me out a lot. If I may I would like to request the implementation of the nameplate for NPCs to show their name and health above the actor. That would be really helpful as well. I didn't fully dive into nameplate manager and nameplate sources.
Perfect! Exactly what I wanted to implement, thanks!
Incredible! Just what i needed! I would be really to hear your ideas about wave system to spawn Lyra custom AI's. Should i use NPC spawner for that, what would be your steps to create a wave system for our lyra framework
Thank you so much!
Thanks for the tutorials. I tried playing in client mode but the client does not respawn when it dies (Player Character, not npc), has anyone else had that issue? I have GA_AutoRespawn added.
Same here. Were you ever able to solve this?
I have fixed the issue where the clients don't respawned and updated the github code! Took me a little while but was very satisfying to see Clients respawning! Here's the commit with the changelist (just moved 2 lines) github.com/NanceDevDiaries/Tutorials/commit/d0fb0db0bc420204bd0e00b112adc1c312740e1d
If possible can we go back to diving in the swim component the surface is perfect but going deeper is even better XD
Just to clarify, diving/under water functionality? I'll make a note 📝
@@nancedevdiaries yup! Thanks !
Is there anyway disable the dash feature in lyra?!
You can just remove it from the ability set and input mappings
How to make NPC`s ?
With COVID mandate
Sorry for stupid question, but what's the difference between a character with & without player state? would that be a better performance?
Not a stupid question at all! I answered a similar question here to @kryogenicgames. It's more that I don't need a PlayerState per AI, unsure of the performance costs, one less actor/AInfo to manage/spawn. th-cam.com/video/uR6y6Tc8dm8/w-d-xo.html&lc=UgwtgOPu4PzyoImjRhh4AaABAg.9v-mZA2bjVI9v1O56KQwnw
thx you are the best!
NPCs Without Player States: This method streamlines AI creation and potentially improves performance, allowing NPCs to function without the overhead of Lyra's complex Player State system.
your game looks cool ;). perhaps stupi question, what is the advantage having it without player state?
Thanks! In my case, it's more that I don't need to keep any persistent variables or data like score for the NPCs, which playerstate is great for, and replicated persistent variables/data. So, it's just not needed, not sure of the performance gains. Also helps if let's say I'm adding a component to all playerstates modularly, I don't need NPCs to get those components, less complexity.
I searched around and looked like "wants Playerstate" was a variable that was only exposed to controllers in blueprint in 4.20, which I found interesting. Cheers!
NPCs Without Player States: This method streamlines AI creation and potentially improves performance, allowing NPCs to function without the overhead of Lyra's complex Player State system.
What needs to be done to get NPCs without PlayerState to use AnimBP correctly?
I don't know how, but now it works
@@sergey8229 Do you still don't know how? I ran into the same issue.
@@WackyWhiskerDev I know that animBP works from the third-person example, I don’t remember exactly, but it didn’t work with the animation from Lyra