As you know (or not), there is a spell “raise-dead”. It turns nearby corpses to undead that fight on your side. They can’t be commanded though (f.e. you can’t command an undead archer). How do I check if a unit is undead (so I can command it if not)?
Hi @xantar, welcome back!
I use this code to avoid that annoying bug:
archers = hero.findByType("archer", hero.findFriends()) corpses = hero.findCorpses() for archer in archers: if not archer in corpses: enemy = archer.findNearestEnemy() hero.command(archer, "attack", enemy) else: continue
I hope this solves your problem.
Thanks! I didn’t know that zombies are in corpses, too.
I know! It doesn’t really make sense, but it’s helpful.