Hi Kaleb_Aziz,
Info about the trust levels here:
Hi Kaleb_Aziz,
Info about the trust levels here:
Oh, sorry about that. I think I was distracted with other posts and didnāt take note of how old the first post was. I think the article that jka shared should help with your question on number of postsā¦and of course, since you are not the originator, you cannot edit the title or set the topic to solved. Iāll do so, on your behalf, this time.
I canāt get my code to work.
My code:
while True:
# Collect gold.
gold = hero.findItems()
if gold:
hero.move(gold.pos)
# If you have enough gold, summon a soldier.
if hero.gold > costOf("soldier"):
hero.summon("soldier")
# Use a for-loop to command each soldier.
for friend in hero.findFriends():
if friend.type == "soldier":
enemy = friend.findNearestEnemy()
# If there's an enemy, command her to attack.
# Careful! If your soldiers are defeated, a warlock will appear!
# Otherwise, move her to the right side of the map.
if enemy:
hero.command(friend, "attack", enemy)
else:
hero.command(friend, "move", hero.pos)
change that to gold = hero.findNearestItem()
When I build a soldier and tell it to move, the soldier is not moving and only I am.
can you show me your code becaue J_F_B_M is not active