Posted February 21, 2024 by Dameron Cook
Update to my Unreal Project for my coding 1 class. This week we've added arrays and enemies to our projects.
For enemies, we added an enemy, enemy spawner, and an enemy spawn locator.
The enemy spawner gets all of the enemies in the scene, and puts them into an array. From there, we add enemies to the scene if there are none, and we check if there are any enemies in the scene using a loop running every 2 seconds.
In the enemy blueprint, we switch the enemy material and enemy name using built in arrays. These are assigned randomly to the enemy using the SHUFFLE node.
Code that uses arrays to switch enemy material and names randomly: https://blueprintue.com/blueprint/qu4mnbx_/