Skip to content

Current questions and answers regarding the map editor.

User Avatar
#4256
Auto-translated
Try this: `
EnableHeroAI(hero, nil); -- disable the hero's AI
sleep(1);
SetObjectEnabled(hero, nil); -- remove the standard touch handler (combat)
sleep(1);
Trigger(HERO_TOUCH_TRIGGER, hero, func); -- set your own handler
`. It must be done in this sequence and with pauses. As far as I remember, you can't assign your own functions to a hero until you disable their AI.