# Summon some soldiers, then direct them to your base.
# Each soldier costs 20 gold.
while hero.gold > hero.costOf("soldier"):
hero.summon("soldier")
soldiers = hero.findFriends()
soldierIndex = 0
# Add a while loop to command all the soldiers.
while soldiers > 0:
soldier = soldiers[soldierIndex]
hero.command(soldier, "move", {"x": 50, "y": 40})
# Go join your comrades!
hero.moveXY(51, 41)
I need help on Cloudrip Commander, only my hero moves and not the soldiers
type or paste code here
# Summon some soldiers, then direct them to your base.
# Each soldier costs 20 gold.
while hero.gold > hero.costOf("soldier"):
hero.summon("soldier")
soldiers = hero.findFriends()
soldierIndex = 0
# Add a while loop to command all the soldiers.
while True:
soldier = soldiers[soldierIndex]
hero.command(soldier, "move", {"x": 50, "y": 40})
soldierIndex+1
hero.moveXY(51, 41)