Let's Build the RPG! - 76 – Random Respawn Location, with some (Bonus?) Caveats

Опубликовано: 14 Октябрь 2024
на канале: NumenBrothers
466
17

In this episode we cover how to respawn a character at a random location in a given level following death. This is the first episode we cover the GameState, which is the right place to track general information on the state of the game at any given time. The reason we're using Game State is to determine where each character is in the level, and make sure to respawn at a random location furthest away from any other character. The last feature we set up is a character advantage upon death (especially for the player character), which is facing them toward the closest available Gameplay Ability Pickup actor.

00:00 Intro
00:13 Today's Goals and Key Concepts
01:32 Get Random Respawn Location
09:46 Tracking multiple characters in Game State
11:55 Get Best Random Respawn Location
20:52 Updating list of characters on the Game State every time a new character is spawned/killed
27:24 Pointing the respawned character to the closest available gameplay ability pickup
34:09 Cleanup
35:11 Conclusion and preview of next episode

References:
Game Mode and Game State:
https://docs.unrealengine.com/4.27/en...


New episode released every Saturday morning!

If you're looking for a logical place to jump in and start the series, I recommend coming in at episode 23 (but you'll still need to go back and do some previous episodes- for example, footstep effects).

But this is an important note:
I would only start at episode 23 if you already have some experience with Unreal Engine, with Blueprints, and with Niagara. Otherwise you're going to have a difficult time going back and figuring out how I did things in previous episodes.
If you don't have that pre-requisite knowledge I would start the series from the beginning.

Episode 23 (first episode of Gameplay Abilities):
   • Let's Build the RPG! - 23 – UE5 Niaga...  

Episode 26 (where we actually start our Gameplay Ability System, 23 is a prerequisite):
   • Let's Build the RPG! - 26 – Creating ...