Join Dan Violet Sagmiller for an in-depth discussion in this video To drone or not to drone, part of Unity 5: Build a Real-Time Strategy Game.
- View Offline
- Exercise Files
- [Voiceover] We need more drones…in order to test that our command base AI…will continue adding bases.…This means we need an AI that decides to build drones,…and then builds them.…We'll start with deciding to build a drone.…To do this, I'm gonna go in to the Scripts folder,…and then the AI folder.…And in here, I'll create a new script…called "CreateDronesAI".…Now let's edit CreateDronesAI.…The first thing about CreateDronesAI…is that it's going to be an AI behavior.…So let's inherit from that.…
Next, I'm gonna get rid of these start and update methods,…because we won't be using them.…Now, in order for this to work,…I need to know how many drones…a single base should support.…So I'm gonna say "public int DronesPerBase".…And we'll say that it equals five for now.…Next I need to know how much a drone costs.…And we'll say it's 25 for now,…which happens to be how much an individual drone costs.…Last, we're gonna need easy access to the support variables,…so I'm gonna throw that into the code right now,…"private AISupport support".…
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.