Andrew Booth 3D
  • Home
  • About me
  • Still Life Project
  • Twitter
  • Linkedin
  • Archived Blog

Setting up spawning functionality Pt1.

8/16/2018

0 Comments

 
Now that I have the room and the door imported with some logic scripted for the door animation; I next worked on the spawning functionality. I did this using a parent/ child hierarchy concept by creating a blueprint called "Asset Handier".

This blueprint which handles all my data from stored classes, the passing this through all data stored within it to all children and will be the overall parent to most of functionality  concerning spawning including the 3D assets data.

This blueprint also include a static mesh component that I leave blank that will be populated with mesh data later in child blueprint so that each child can have different assets with their on logic.

Picture
Picture
Picture
Picture
From  this I created a child blueprint from "Asset Handier" named as "Asset Spawner". This child blueprint will be where I handle the logic for the spawning of the asset being used for the game mechanics.
The logic for the child blueprint is broken into different sections. The first part is the referencing of variables stored in the parent even though the child blueprint inherent these variables It is makes it easier access to that data and more time efficient just getting the data from variables panel compared to searching for the data in the drop down menu.
 The second part is constructing the the loop index of the logic. As this is going to be the main logic of the game to spawn meshes I made an integer  variable for max amount of assets I want.
Picture
Another integer variable i used was 'spawned amount'; this is in the index of how many meshes was spawned. The concept is that, I use a 'For Loop' node that fires a custom event in the loop; then later in the logic adds one on to the spawned amount. Doing this turns the script into a checking loop logic where I test between the amount spawned and the spawned max. This means if the amount spawned is less the the spawn max the fire another loop until the spawned amount index equals the spawned max.
0 Comments



Leave a Reply.

    Author

    Write something about yourself. No need to be fancy, just an overview.

    Archives

    August 2018
    July 2018

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • About me
  • Still Life Project
  • Twitter
  • Linkedin
  • Archived Blog