Download

Making a spawnable minion in blueprints

Okay so my question seems simple enough, but I haven’t the foggiest idea where to start.

I’m trying to make the following:

  • A monster with Stats (HP, Armor, Money Value (on kill), etc)
  • it spawns at a spawner (let’s call it Point A)
  • It creates the shortest path to point B and walks towards it.
  • If for any reason the Previous path is blocked, it recalculates the path it will take.

It seems easy enough in my head but looking at the AI tutorials, I’m at a bit of a loss. What order should I be doing this in? I searched here and Unreal Answers but i came up empty handed. I know sometimes searching using the wrong terms doesn’t help.

I’m not exactly a noob at Blueprints but I’ve never delved into AI related things, so any advice or links to throw me in the right direction would be SO appreciated.

Thanks

The stats part is easy. After the Begin Play or Construct, just fill in the relevant variables. HP to some amount you want it to have, armor the same way, etc. Could be as simple as a “Set HP to 10” or you could make it more complex to have it be set to a random number based on its level, strength, constitution and wisdom. In my project, I have the Actor generate random attributes (strength, intelligence, etc) and then generate its statistics (health, mana, etc) based on its attributes levels.

Picking a spawner is just a matter of telling it where to spawn. You would acquire the location of the spawner (Point A) by using a reference for Point A and Get Actor Location off of it. Then you have the location of where to spawn the monster.

For the rest of them, generate a Nav Mesh Volume. You would have to tell it where to go (Point B) and tell it to move. The Engine will take care of the rest of that as long as there is a path for the monster.

Thanks for the starting point. I’ll give that a try and will update with progress.