Skip to content

Ashton Sanders

Technical Game Designer

A Technical Game Designer with a passion for making fun, engaging, and player-focused games. 


Random Object Spawner

Download and playtest the build here!

Random Object Spawner Video Showcase

This video showcases the final iteration of my random object spawner system. It was built in Unreal Engine 5.1 using Blueprints. Final video to be uploaded soon!

1 This code controls the entire ore spawning system. The object types, maximum objects, and  object spawn frequency are all edited in the details panel of the controller object.
2 The spawn ores function is part of the Spawn Controller Blueprint. This dispatches the spawn event to the spawn locations on the map, and it randomizes the locations by using a shuffle node.
3 This is the overhead event graph of the Spawn Location function. It runs an item check to determine if the location already has an ore spawned. If yes, a new ore cannot spawn in the same location. If no, a new ore can spawn in the location. 
4 This function is called by the Spawn Controller script, but it runs in the Object Location Blueprint. It runs the check event to see if an object can spawn. If an object can spawn, it determines what object to spawn by calling the object's rarity.
5 This code exists in the Object Location Blueprint. It is used to determine the rarity of the object spawning by utilizing an Enum list and a random number generator.
After the rarity of the object is determined, this code spawns the correlating actor based on the inputs in the Object Controller details panel. It also sets the transform of the spawned object equal to the Object Location. 
7 This graph is the event graph of the ore parent object. It allows the object to be picked up by the player, and on pickup, it destroys the spawned object.