From 8d5ccc183c8bb676882a25fe1c87412402d8ec73 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 28 Dec 2017 20:56:06 -0600 Subject: [PATCH] Added README files to each folder Created a README.md in each folder containing information about the tutorial step, including the console commands entered in each tutorial. --- section1/README.md | 13 +++++++++++++ section2/README.md | 13 +++++++++++++ section3/README.md | 14 ++++++++++++++ section4/README.md | 7 +++++++ section5/README.md | 12 ++++++++++++ 5 files changed, 59 insertions(+) create mode 100644 section1/README.md create mode 100644 section2/README.md create mode 100644 section3/README.md create mode 100644 section4/README.md create mode 100644 section5/README.md diff --git a/section1/README.md b/section1/README.md new file mode 100644 index 0000000..97d1a91 --- /dev/null +++ b/section1/README.md @@ -0,0 +1,13 @@ +Console Commands in Tutorial +--- +Spawn a new creep named `Harvester1`. + +``` +Game.spawns['Spawn1'].spawnCreep([WORK, CARRY, MOVE], 'Harvester1'); +``` + +Spawn a new creep named `Harvester2`. + +``` +Game.spawns['Spawn1'].spawnCreep([WORK, CARRY, MOVE], 'Harvester2'); +``` \ No newline at end of file diff --git a/section2/README.md b/section2/README.md new file mode 100644 index 0000000..55086b8 --- /dev/null +++ b/section2/README.md @@ -0,0 +1,13 @@ +Console Commands in Tutorial +--- +Spawn a new creep named `Upgrader1`. + +``` +Game.spawns['Spawn1'].spawnCreep([WORK, CARRY, MOVE], 'Upgrader1'); +``` + +Differentiate the creeps by storing values in memory using a key named `role`. +``` +Game.creeps['Harvester1'].memory.role = 'harvester'; +Game.creeps['Upgrader1'].memory.role = 'upgrader'; +``` \ No newline at end of file diff --git a/section3/README.md b/section3/README.md new file mode 100644 index 0000000..05e01d1 --- /dev/null +++ b/section3/README.md @@ -0,0 +1,14 @@ +Console Commands in Tutorial +--- +Spawn a new creep named `Builder1` and store the role in memory as `builder`. + +``` +Game.spawns['Spawn1'].spawnCreep([WORK, CARRY, MOVE], 'Builder1', { memory: { role: 'builder' } }); +``` + +Spawn a new creep named `HarvesterBig` with the role `harvester`. +``` +Game.spawns['Spawn1'].spawnCreep([WORK, WORK, WORK, WORK, CARRY, MOVE, MOVE], + 'HarvesterBig', + { memory: { role: 'harvester' } }); +``` \ No newline at end of file diff --git a/section4/README.md b/section4/README.md new file mode 100644 index 0000000..373489c --- /dev/null +++ b/section4/README.md @@ -0,0 +1,7 @@ +Console Commands in Tutorial +--- +Call the suicide method on the creep named `Harvester1`. + +``` +Game.creeps['Harvester1'].suicide(); +``` \ No newline at end of file diff --git a/section5/README.md b/section5/README.md new file mode 100644 index 0000000..f3fcefd --- /dev/null +++ b/section5/README.md @@ -0,0 +1,12 @@ +Console Commands in Tutorial +--- +Activate safe mode via the controller in the room which contains `Spawn1`. + +``` +Game.spawns['Spawn1'].room.controller.activateSafeMode(); +``` + +Place a tower structure at coordinates `(23,22)`. +``` +Game.spawns['Spawn1'].room.createConstructionSite(23, 22, STRUCTURE_TOWER); +``` \ No newline at end of file