Join Dan Violet Sagmiller for an in-depth discussion in this video Create the drones, part of Unity 5: Build a Real-Time Strategy Game.
- Now that our AI can decide if it should have more drones,…we need to teach it how to make them.…Of course, this is the first time our AI will be expected…to operate continuously.…By continuously, I'm referring to the fact that it will…build more drones, which will allow it to build more bases,…and so on.…We'll need to make sure that the results make sense…and if not, fix them.…So in the project, under the assets, scripts, and AI folder,…I'm going to open and edit CreateDronesAi.…In the CreateDronesAi, I need to extend out…the execute function.…
In order to do this, I'm going to need to select a base.…A base in order to build the drone from.…To do that, I'm just going to pick a random base that…that particular player has.…So, var bases = support.CommandBases;…Now I'm going to select a random index,…var index = Random.Range…between 0 and bases.Count);…Now I'll select a random command base,…var CommandBase =…bases [Index];…And finally, I need to locate and execute…the create unit action.…
So back in Unity, if I select a command base,…
AuthorDan Violet Sagmiller
- Adding player positions and start info
- Loading prebuilt levels
- Adding camera moves
- Adding a unit
- Supporting navigation
- Adding unit owners and player objects
- Importing and setting up a HUD map
- Adding unit info and credits
- Creating HUD actions
- Building a command base
- Adding artificial intelligence
- Adding battle actions
Skill Level Intermediate
Unity 5 2D Essential Training (2015)with Jesse Freeman3h 22m Intermediate
1. Initial Setup
2. Adding a Unit
3. Navigation Mesh
4. Unit Owner
5. HUD Map
6. Unit Info & Credits
7. HUD Actions
8. Command Base
9. Base AI
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.