Join Dan Violet Sagmiller for an in-depth discussion in this video Create the building, part of Build a Real-Time Strategy Game with Unity 5.
- [Voiceover] We know we want our AI to build a base,…but we need to train it.…Basically, we'll pick a drone and a random location…around that drone, and we'll see if our base can go there.…If not, we'll try a few more random spots.…If we still can't find anything, we'll assume the drone…is in a crowded area and try the next drone,…until we can find a place to put the base.…So to get started, I'm gonna go into the Scripts folder…and then into the Ai folder, and then I'm going to…edit the CreateBaseAi.…In the CreateBaseAi, I'm going to add…a couple more variables to the top.…
A couple more public fields.…First off, I need to know how far…from the drone can we build a base.…I'll set this to 30, that's the same default…that the player is working with now.…Next, how many times should we try to build…for a single drone before we move on to the next drone?…So, public int…TriesPerDrone, and I'll set that to…3 by default.…Next, I need the base prefabbed so we can…actually build the base.…
So public GameObject BasePrefab.…
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.