Auto-translated
Waiting.
New here? I'm Roha — want a quick tour?
How do I make a town get destroyed when it's captured?
function raze_captured_town(oldowner, newowner, hero, town)
Trigger(OBJECT_CAPTURE_TRIGGER, town, nil)
RazeTown(town)
end
Trigger(OBJECT_CAPTURE_TRIGGER, 'script_town_name', 'raze_captured_town')
function raze_captured_town(oldowner, newowner, hero, town)
Trigger(OBJECT_CAPTURE_TRIGGER, town, nil)
MakeTownMovable(town)
sleep()
RemoveObject(town)
end
Trigger(OBJECT_CAPTURE_TRIGGER, 'script_town_name', 'raze_captured_town')
The first option leaves behind ruins, but it only works with Haven and Inferno towns.
The second option simply removes the town, but it works for towns of all factions.
How do I add the Devil's Chain and Hellfire Wave spells to a hero's spellbook in the scenario editor so that they deal damage?
In the editor, add them to the hero's spellbook through the properties tree.
Yes, there is. The chain is called SPELL_UBER_CHAIN_LIGHTNING or something like that, and the wave is located nearby in the list.
I apologize, how can I force the AI to attack a specific hero, regardless of the danger? So that it rushes towards the player from the very first turn, no matter how dangerous it is, even if the hero is in a castle.
I can offer a script to make the AI more "interested" in a specific object. However, you'll need to keep the hero in one place. Here's the script:
void SetAIPlayerAttractor( sObjectName, nPlayerID, nPriority ) The priority can range from -1 to 2.
Is it possible to create a hero using scripts that doesn't belong to any faction (Neutral, essentially)? It's not even necessary for him to be able to move, but if that's possible too, that would be even better.
SetObjectOwner('scripted_hero_name', player_number_not_participating_in_the_game)
This trick won't work on a map for 8 players.