Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 5 - Modders Workshop > Thread: The script
Thread: The script
Moonlith
Moonlith


Bad-mannered
Supreme Hero
If all else fails, use Fiyah!
posted July 08, 2007 02:32 PM
Edited by Moonlith at 14:33, 08 Jul 2007.

The script

I'm not sure if this section is the right place to ask, but I figured I could try.

It's regarding the map editor script. Would someone be able to provide me with a script giving any new hero hired by a specific player a number of experience, skills, spells, artifects or the like, as a starting boost?

I'm mostly unsure how the triggering-and-effects work.

I'm trying to get into the script but it's hard to learn I feel, the manual is very lousy and may state all commands (Or just about all), but doesn't state in what order you need to list it and all.

Any chance someone with too much time on their hands could make a better manual?

Thanks in advance.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Daystar
Daystar


Honorable
Legendary Hero
Back from the Dead
posted July 08, 2007 02:49 PM
Edited by Daystar at 15:31, 08 Jul 2007.

This isn't much help, but someone on celestial heavens already has.  Go to their forum and search "Script" or "Heroes V Script" or something like that, there's a link somewhere.

EDIT: Here it is!  
____________
How exactly is luck a skill?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
sfidanza
sfidanza


Promising
Supreme Hero
posted July 15, 2007 07:10 PM

I also suggest you have a look at the scripts in the H5 maps. Look for lua files in the maps folder, you should get an idea how they work in practice.

What you want to do seems pretty feasible. You need to use the PLAYER_ADD_HERO_TRIGGER. The handler function will receive the hero name, allowing you to add exp, spells, skills...

It would go something like:

function boost_hero(heroname)
ChangeHeroStat(heroname, STAT_EXPERIENCE, 5000); -- add 5000 exp
GiveHeroSkill(heroname, SKILL_DEFENCE); -- give basic defense
...
end;

Trigger(PLAYER_ADD_HERO_TRIGGER, PLAYER_1, "boost_hero");

Note that requirements have to be met when adding skills or it won't work.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0163 seconds