but the enemy variable is equal to hero.findNearestEnemy()! --> hero <-- !!!
Just try to make them focus on the same enemy
ok. wait. I am working on my codeā¦
Ok, @Eric_Tang, hereās my updated code:
while True:
friend = hero.findByType("griffin-rider")
enemy = hero.findEnemies() and friend.findEnemies()
if hero.gold >= hero.costOf("griffin-rider"):
hero.summon("griffin-rider")
for friend in friends:
hero.command(friend, "attack", enemy)
It says thatā¦oh I wonāt explain it here! Hereās a screenshot of the problem:
delete the friends.findEnemies and you should probably add your old code aswell
change that to enemy = hero.findNearestEnemy()
I know how to do it. Four isnāt too hard. But one question, how did you get boss star 4 when donāt even know how to use it? You should definitely know how to use it or else how did you pass earlier levels? @The_Master_Coder
Code:
while True:
friend = hero.findFriends()
enemy = hero.findNearestEnemy()
if hero.gold >= hero.costOf("griffin-rider"):
hero.summon("griffin-rider")
for friend in friend:
hero.command(friend, "attack", enemy)
Problem:
I still die and griffin-riders are not strong enough. Please help, @Eric_Tang
As I told you before add your old code you canāt rely on your soldiers
Code:
while True:
friend = hero.findFriends()
enemy = hero.findNearestEnemy()
if hero.gold >= hero.costOf("griffin-rider"):
hero.summon("griffin-rider")
for friend in friend:
hero.command(friend, "attack", enemy)
if enemy:
hero.attack(enemy)
I still die. I men my hero still dies.
Like I mean with the invisibility and brawler code
oh, ok. Trying codeā¦
Code:
while True:
friend = hero.findFriends()
enemy = hero.findNearestEnemy()
if hero.gold >= hero.costOf("griffin-rider"):
hero.summon("griffin-rider")
for friend in friend:
hero.command(friend, "attack", enemy)
if enemy and enemy.type != "brawler" and enemy.type != "sand-yaks":
if hero.canCast("invisibility", hero):
hero.cast("invisibility", hero)
else:
hero.attack(enemy)
Problem:
My hero STILL dies.
delete
20 characters
Several tips:
- go to the corner
- switch to a faster sword (Sword of the temple guard or Sword of the forgotten. better to use the temple guard though since the powerup will be very useful)
- target the shamans or witches (if there are any) first with your troops
- donāt need invisibility
- try summoning griffins and paladins. they are the best. (heal + damage and knockback)
And how did you get boss star 4?
Code:
while True:
friend = hero.findFriends()
enemy = hero.findNearestEnemy()
if hero.gold >= hero.costOf("griffin-rider"):
hero.summon("griffin-rider")
for friend in friend:
hero.command(friend, "attack", enemy)
if enemy and enemy.type != "brawler":
if hero.canCast("invisibility", hero):
hero.cast("invisibility", hero)
else:
hero.attack(enemy)
Problem:
My hero still dies
Listen to @Code_Master he has good tips
@Code_Master, I got Boss Star IV by finishing a level in Kelvintaph Glacier and by finishing all the levels
ok @Eric_Tang!!!

