Two enemy heroes with different faction flags were standing still, and one of them couldn't be attacked.
EnableHeroAI('scripted_hero_name', nil);To make them stand still and unable to be attacked: EnableHeroAI('scripted_hero_name', nil);
sleep(1);
SetObjectEnabled('scripted_hero_name', nil);