Search found 362 matches

by Franzy
29 Aug 2010, 12:51
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

Combat scripts work a little differently. They are hooks that trigger every time a cetain event happens. The hook start() doesn't have any arguments.
by Franzy
29 Aug 2010, 09:19
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

No.
by Franzy
28 Aug 2010, 12:44
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

Try switching \ to /
by Franzy
27 Aug 2010, 17:34
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

try adding another '\' in the beginning so it would become \Maps\Multiplayer\.....
by Franzy
25 Aug 2010, 17:38
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

I recommend using SetHeroCombatScript to set the script for a required hero :)
by Franzy
25 Aug 2010, 04:11
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

Unlike heroes, towns don't have innate names, you should assign them yourself. Just open town properties tree (ctrl+space) and write any id in the NAME field.
by Franzy
24 Aug 2010, 19:34
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

Yeah, that can be done. You need to write a special combat script for your hero. Take a look at my map Mercenaries, the main hero there can get an ability to cast various spells in the beginning of the battle (like the armor of the damned in Homm3). Look for key words SetHeroCombatScript and SetGame...
by Franzy
24 Aug 2010, 19:31
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

Town building works differently. You specify building level there. 0 - no building, 1 - there is building, 2 - upgraded building, 3- second upgrade (for mage guilds, town halls, castles) etc. Name of the function is in the manual, don't remember.
by Franzy
23 Aug 2010, 19:45
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

What skill you want to implement?
by Franzy
23 Aug 2010, 03:36
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

You can add perks provided hero has appropriate skills using the very same GiveHeroSkill. You can learn skill's mastery using GetHeroSkillMastery. You can increase mastery by giving the very same skill one or two more times accordingly.
by Franzy
22 Aug 2010, 17:26
Forum: Mapmaking Guild
Topic: MakeHeroReturnToTavernAfterDeath
Replies: 10
Views: 6063

That's because deadguy function is called AFTER hero death, while you need to use MakeHeroReturnToTavernAfterDeath BEFORE death. I suggest using PLAYER_ADD_HERO trigher instead.
by Franzy
22 Aug 2010, 17:24
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

Well, if you don't really need any GUI changes you can create any skill :)

As for startThread, the problems is probably in reverse calls. Your function loop calls itself. Don't know if lua can handle that. Anyway, it's always a bad idea.
by Franzy
22 Aug 2010, 17:21
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

Hm. Maybe lua can't manage forward calls. Try writing all the functions BEFORE you call them.
by Franzy
19 Aug 2010, 17:43
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

No idea :) You should probably trace every line.

Also, do you know you can execute any script command in console by preceeding it with @ symbol? I usually try my code line by line (well the commands I'm not sure about) this way before putting it into script.
by Franzy
18 Aug 2010, 21:17
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

Remember, triggers pass various useful info to trigger handlers. So you can write: function addstufftonewguy(newguy) GiveArtefact(newguy, 4); GiveHeroWarMachine(newguy, 1); GiveHeroWarMachine(newguy, 3); GiveHeroWarMachine(newguy, 4); end; Trigger(PLAYER_ADD_HERO_TRIGGER,PLAYER_1,'addstufftonewguy');
by Franzy
17 Aug 2010, 17:51
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

As for your other questions: for 1 = 1, 1 do will generate an error I believe you meant something like for i=1,1 do This will run 1 time. for i=1,0 do will run 0 times. Did not understand you 3d question. Is it a suggestion? Also, day counting starts from 1, not 0. P.S. To save you from a common mis...
by Franzy
17 Aug 2010, 17:47
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

The script is executed ONCE right after the map is created BEFORE any player moves. To execute a code on a certain day or event, use triggers. For the new turn (day) trigger use NEW_DAY_TRIGGER. This trigger triggers when the new turn is started by the first player. There is no trigger for the end o...
by Franzy
15 Aug 2010, 20:26
Forum: Mapmaking Guild
Topic: [H5 EDITOR] Troubleshooting topic
Replies: 579
Views: 224716

Docs are not udated with the patch, there is not even a devent readme. I suggest you browse the forum. I posted changelist for the past a while ago.
by Franzy
15 Aug 2010, 14:54
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

Aw, you mean a skill that would be available to ALL heroes? Might be possible, but not likely. Many skill-related things are hardcoded.
by Franzy
14 Aug 2010, 19:51
Forum: Mapmaking Guild
Topic: Spawning main heroes
Replies: 110
Views: 39459

You mean teach hero a skill? You can do that via hero properties or via functions. Don't remeber the spelling. GiveHeroSkill or TeachHeroSkill...

Go to advanced search