def commandTroops():
for index, friend in enumerate(hero.findFriends()):
if friend.type == ‘peasant’:
CommandPeasant(friend)
def CommandPeasant(soldier):
item = soldier.findNearestItem()
if item:
hero.command(soldier, “move”, item.pos)
while True:
commandTroops()
hero.move({‘x’: 41, ‘y’: 55})
This is my code ^^^^^
its not really working to well.
it worked before i submitted but now its giving me an error saying that i cant "Command"
this is after ive already asked around and that was the code i got, so i was wondering what I should put instead of command
Do you have a Boss Star? If you don’t, that would explain the error message. If you do have one, make sure that it’s equipped, not just in your inventory.
Okay look. I am just looking for help with my code. Certain levels give me trouble, so I ask the forum. THATS WHAT ITS FOR. Just because you got upset that I tried everything I could to get some code for a level doesn’t warrant @MunkeyShynes being rude to me or my account being reprimanded. I used the forum for its purpose, so there is no reason that action should be taken against me.