Join Dan Violet Sagmiller for an in-depth discussion in this video To battle or not to battle, part of Unity 5: Build a Real-Time Strategy Game.
- [Voiceover] To get a battle going,…we need the AI to attack.…Of course we need explosions and unit demise,…but we'll start with the AI sending units to the player,…or at least, the decision to send them.…What I'll do is say that at certain intervals…if I have enough units, I'll announce the attack.…So starting out, I'm going to go into the scripts folder,…and then into the AI folder,…and here I'll create a new script called StrikeAi.…Inside of StrikeAi, the first thing I want to do is…turn it into an AI behavior.…
And then I'll get rid of these start and update methods.…Now I do need a couple public variables.…The first thing is how many drones are required…before we actually send a wave to strike at the player.…So I'm going to say,…public int DronesRequired…and I'll say it equals 10…We have to have 10 drones,…not that we're going to send them all,…but that we need at least 10…before we send our first wave.…Next, I want to know how much time we should wait.…So public float TimeDelay =,…and if this were a regular game…
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.