Using Arrays to Add Eunctionalities to our Enemies


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_/

Files

Coding1Unreal.zip 406 MB
90 days ago

Get Coding 1 Spring 2024 Project

Leave a comment

Log in with itch.io to leave a comment.