Skip to content

Help with a map.

User Avatar
#2
Auto-translated
1) Make something happen relative to the player's coordinates.
You can get the coordinates of any object using the GetObjectPosition() function and use them as a basis.
2) Change the computer player's name (something like this: Red Player > Knight).
This can only be done through a mod. Look for the words and phrases you need in the game's resources, create similar files within your map with the same relative paths, and edit the names in them. (This task is not trivial in some cases).
3) Create your own spell (not in battle, but during a turn).
There are 4 slots for custom spells that can be used outside of battle; the first 2 are used by some hero specializations in the Campaigns, and 3-4 are completely free (they don't even have icons). As an example, for the 3rd:
ControlHeroCustomAbility(HERO_NAME, CUSTOM_ABILITY_3, CUSTOM_ABILITY_ENABLED);
SetTrigger(CUSTOM_ABILITY_TRIGGER, 'CustomAbilityHandler');

function CustomAbilityHandler(player_hero, id)
if(id == CUSTOM_ABILITY_3) then
YOUR CODE
end
end

Statistics

Welcome our newest member: leyu