In this tutorial we will integrate the Open World AI Spawn System that is (at the time of writing this) available for free on the Unreal Engine 4 Marketplace.
Create a new FPS Game Starter Kit project
Add Open World AI Spawn System to it
FPS Game Starter Kit
- No changes are needed inside FPS Game Starter Kit.
Open World AI Spawn System
1. Open the demo map that comes with Open World AI Spawn System and set the game mode to be BP_GameMode, additionally, locate the player start and place any weapon from FPS Game Starter Kit there.
2. While there, open the door blueprint and set the overlap character like in the image bellow, so that it registers the FPS Game Starter Kit character and the doors box collision to ignore projectiles.
3. Now the real fun begins, open BP_Ai_Master that comes with Open World AI Spawn System and break it, like, literally.. click on the character reference variable and force change it to be BP_CharacterBase, UE4 will do it, but the blueprint will be broken. Nothing to worry about, we’ll fix it relatively easy.
With the new variable changed, replace the old cast with a new one that casts to BP_CharacterBase
4. Inside that same blueprint, locate this cast and replace it with BP_CharacterBase as well
5. At this point it still will not compile because that variable is referenced in more places inside that same blueprint, so disconnect the red lines and connect them back using the new variable.
NOTE: change the health variable and apply damage node as well, like in the screenshot. If you feel like the enemies are too weak or too strong, feel free to adjust those. But at this point it should be able to compile fine, so we’re almost done!
6. On its capsule component, change the collision settings to be like this.
7. And on its mesh component, change the collision to be like this. Additionally add the flesh surface type onto it, to have the blood particle show up.
If you have any questions regarding Open World AI Spawn System, you can find several links to its own tutorials on their store page.