In heroes 3 there was an object called an event that you could place on the map.
Assume that I and my companions wished to play a map in which everyone's first hero was higher than average level. Instead of littering the map with treasure chests, I could place a one-time event that would simply grant X experience.
I presume that this can be done in heroes 5 with scripts, but I haven't any idea as to how. Could anyone point me to a place where I might learn how to accomplish said task?
Events and Free Levels (H5)
place an area and name it to "AreaName" for example:
For +5000 exp should go:
To learn more, seek out the editor documents in Homm5 catalogue and my own little material is available under downloads section
For +5000 exp should go:
Code: Select all
function boost(heroname)
ChangeHeroStat(heroname, STAT_EXPERIENCE, 5000);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "AreaName", nil );
end;
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "AreaName","boost", nil );
Avatar image credit: N Lüdimois
-
- Leprechaun
- Posts: 26
- Joined: 30 Sep 2007
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
Pitsu means place a region in from of the towns that the player could start from. You also have to place obstacles such that the player would have to pass through the region. In his example, the region is named "AreaName." nil makes the area only execute the instructions one time and then never again.GohozoqPohobo wrote:I have a little coding experience, but I'm still struggling.
What do you mean "place an area?"
My first try is going to be on warlords.
Presume I wish each hero to start at 7th level.
You should have a look at Pitsu's scripting guide. Plus, you need to go through the map editor manual (all of the parts.) The practical guide shows you how to set up an area. I also recommend that you look at some maps that use scripting.function boost(heroname)
ChangeHeroStat(heroname, STAT_EXPERIENCE, 5000);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "AreaName", nil );
end;
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "AreaName","boost", nil );
An alternative way to do this without regions would be something like:
Edit: The map editor maunals for the various versions are on your computer. Click on the windows start button --> All Programs --> Ubisoft --> Whatever version of heroes you are working with --> Map Editor Manual. You will see that there are a number of entries there.for i = 1, 8, 1 do --do for player (this assumes eight players)
ChangeHeroStat (GetPlayerHeroes(i)[0], STAT_EXPERIENCE, 8000);
end;
GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
-
- Leprechaun
- Posts: 26
- Joined: 30 Sep 2007
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
You are going to need to use this:GohozoqPohobo wrote:Awesome, that worked perfectly.
I'm trying, now, to have events specific to which faction each player chooses.
For instance, if he's a necromancer, he receives bonus X, which knights receive bonus Y.
What function returns faction type?
The skills you will want to check for are basic racial skills, like artificer for the wizard.GetHeroSkillMastery — returns hero’s skill mastery level
Syntax
GetHeroSkillMastery(heroName, skillID);
Description
This function returns defined hero’s skill mastery level (0 – not learned, 1 - basic, 2 - advanced,
3 - expert, 4 - extra expert).
This function works for both learned or given by artifact hero’s skills.
GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."
-
- Leprechaun
- Posts: 26
- Joined: 30 Sep 2007
Who is online
Users browsing this forum: Majestic-12 [Bot] and 1 guest