Game Development Reference
In-Depth Information
spawnPoint
Using the Spawn Actor Of Class node on Event Begin Play , I was able to spawn en-
emies. However, to ensure that it is random and lasts for a while, I set a random value to
the RandomValue variable and based on the resulting value, I pick whether to spawn a red
or green enemy.
To ensure that it is sort of a loop, I decided to use a new approach, which is the Timeline
node. This node controls a value over time. I set its time in its graph to 1.5 seconds, and
never cared about the resulting value as I won't be using it, I just made use of the animation
duration and forced it to run every time an enemy finishes spawning. With this, I get the
following sequence:
1. Execute the timeline node.
2. The node finishes running.
3. Randomize the value of the integer.
4. Select an enemy type.
5. Spawn the enemy.
6. Run the timeline node.
Search WWH ::




Custom Search