Until now it was placed directly in the scene for confirmation, but in actual games it is almost always to appear from the middle.
Finally, I will incorporate it into Wave and let Enemy 3 appear.
- 1. Preparation of tutorial project
- 2. Create Enemy
- 3. About enemy bullet shooting
- 4. Create Weapon
- 5. Adding a behaviour pattern
Apply Enemy3 to Prefab
We will apply the edits so far to prefab.
Please select Enemy3 and press Apply button of Inspector.
Duplicate Wave Prefab
Duplicate Assets/ShootingGame/Prefabs/Wave prefab and change the name to Wave2.
Place Wave2 in the scene
For editing, place Wave2 prefab in the scene.
Instantiation of Enemy3
Change it to instantiate Enemy3 from Wave2.
Please open ArborFSM of Wave2 in Arbor Editor.
|Spawners / Size||1|
|Spawners / Element 0 / Prefab||Enemy3 prefab|
|Spawners / Element 0 / Transform||Pos3 object
(In the center this object)
Apply Wave2 to Prefab
Press the Apply button on the inspector of the Wave2 object to apply it.
Delete Enemy3 and Wave2 objects
Since you no longer need to edit it, delete the Enemy3 and Wave2 objects.
Wave 2 starts after Wave 1 ends
Please select Emitter object from Hierarchy.
If Emitter was disabled for play confirmation, enable it.
Open ArborFSM in Arbor Editor.
It duplicates the Wave1 state and renames it to Wave2.
Change InstantiateGameObject of Wave 2.
Rename original Wave2 state to End Wave.
Set to transition from Wave1 state to Wave2 state and Wave 2 state to End Wave state.
This Wave was able to add.
Finally press “play button” to check the operation.
When Wave1 ends, you can see that the created Wave2 starts.
That’s it! “Let’s make an enemy of 2DSTG” is complete.
The next tutorial is “How to make AI agent”.
I will explain how to control movement and animation of 3D characters with Arbor.