Hi guys, I’m not exactly new around here but I have a problem with Mountain Mercenaries. It keeps saying: Line19 Your Hero Placerholder needs something to command.
Every reply, help and command are thanked.
My Code -
Gather coins to summon soldiers and have them attack the enemy.
# Move to the nearest coin.
# Use move instead of moveXY so you can command constantly.
self.say(“I need coins!”)
# If you have funds for a soldier, summon one. if self.gold > self.costOf("soldier"): self.say("I should summon something here!")
enemy = self.findNearest(self.findEnemies()) if enemy: # Loop over all your soldiers and order them to attack. soldiers = self.findFriends() soldierIndex = 0 soldier = soldiers[soldierIndex] self.summon("soldier") self.command(soldier, "attack", enemy)
# Use the 'attack' command to make your soldiers attack. #self.command(soldier, "attack", enemy)