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 > MapHaven Guild > Thread: Heroes 5 Map Editor Help and Tips...
Thread: Heroes 5 Map Editor Help and Tips... This thread is 43 pages long: 1 2 3 4 5 ... 10 20 30 ... 39 40 41 42 43 · «PREV / NEXT»
rockgirl
rockgirl


Adventuring Hero
posted March 29, 2008 03:48 PM

thx anyway...i try make random sea maps but i cant...i m sad..i want this maps so much

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


Known Hero
Wyld Mapper
posted March 29, 2008 04:14 PM

Quote:
thx anyway...i try make random sea maps but i cant...i m sad..i want this maps so much


I am so sorry. You are making me sad just hearing you talk.

Hey, maybe you could learn to use the editor. I used the tutorial and was able to make my first small map in a single weekend. If you don't bother with scripting, the map editor is pretty easy to use once you get the hang of it. And, it is so much fun raising up mountains, cutting out seas, and making islands, then planting trees and placing other things on the islands.

The maps you make won't be random, but they'll still be fun to play. If you have a friend or family member who can learn the map editor you can take turns making maps for each other.

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


Adventuring Hero
posted March 29, 2008 05:03 PM

i try make a map..but i cant...i think my pc is to slow for this...i need a rmg template for create a random generated sea map...i hope somebody will help me

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

Tavern Dweller
posted June 11, 2008 08:35 PM
Edited by LordLuther at 20:38, 11 Jun 2008.

Text

Good evening ladies and gents, I have a question of my own which i havent seen asked nor answered before in this forum.

Question:

I've started to make a Homm5 HoF multiplayer map,( now i've been loving every inch of it, though i find it hard to work with, not as easy as the map editor of Homm 3 was )
But i want a random creature (for example, i place a footman on the ground) to say something before he attacks or joins the hero encountering it. So i go to MessageFileReff -> Edit and enter the text i want him to say. Now after i've done that, i've tested the map just to see if he said something, but he doesn't say anything before attacking or joining the hero i encounter the unit with.

How can i make Random - Neutral - Willing to join - Creatures say something before acting?

Question #2

I've been toying with the scripts now, and even been pasting in the same text used by the turtorial of the Practical guide, yet, and you've said before the "Function not defined" is a bug, the script doesnt work, and nothing happens. What am i to do when i wan't an action to happen, like for example i want the hero passing the terain to get ambushed by 20 Footman, how do i do that? What do i enter in the Script Fields?


BTW - This forum has been a great help to me, i've been watching it for a while and lots of my questions have been answered, so i just wanted to say thanks to all of the lads putting effort into the answering.

- Lord Luther.
____________
-LordLuther

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


Known Hero
Wyld Mapper
posted June 12, 2008 12:00 AM
Edited by rdeford at 00:01, 12 Jun 2008.

Quote:
Good evening ladies and gents, I have a question of my own which i havent seen asked nor answered before in this forum.

Question:

I've started to make a Homm5 HoF multiplayer map,( now i've been loving every inch of it, though i find it hard to work with, not as easy as the map editor of Homm 3 was )
But i want a random creature (for example, i place a footman on the ground) to say something before he attacks or joins the hero encountering it. So i go to MessageFileReff -> Edit and enter the text i want him to say. Now after i've done that, i've tested the map just to see if he said something, but he doesn't say anything before attacking or joining the hero i encounter the unit with.

How can i make Random - Neutral - Willing to join - Creatures say something before acting?

Question #2

I've been toying with the scripts now, and even been pasting in the same text used by the turtorial of the Practical guide, yet, and you've said before the "Function not defined" is a bug, the script doesnt work, and nothing happens. What am i to do when i wan't an action to happen, like for example i want the hero passing the terain to get ambushed by 20 Footman, how do i do that? What do i enter in the Script Fields?

- Lord Luther.


Question #1-- Unfortunately, the message you created for the creature stack is displayed after the stack is defeated, not before. You can make a message be displayed before the battle, but it is complicated to do this trick in H5 because you have to write a script to do it. And, while scripts for Multiplayer maps work fine, you have to use special multiplayer commands in your script, and the multiplayer commands are not documented.

My answers that follow are for single player scripts

I suggest that you go to: http://www.celestialheavens.com/viewpage.php?id=567
and download the The Basics of Heroes V Scripting ver. 2.0 for H5, HOF, & ToTE. This guide is a must for all would be H5 scripting. It has detailed explanations for all I am going to say next.

First, you have to add the message you wish displayed prior to the battle as a resource file for the map. Then, you have to create a small region around the creature stack. Then, you have to trigger a function the contains the MessageBox() command in it when the hero enters the region. Take a look at the script for my Virgin of Ponce, Episode 1, map for an example of how to do exactly what you wish to do. http://www.celestialheavens.com/search2.php?map_name=&author_name=rdeford&size=&nr_players=&playing_type=&version=&sort_by=map_name&order=asc&multiplayer=&month=&year=&minimaps=on&results1=20&page=1&action=search&submit=Search

Question #2 -- The scripting example in the Practical Guide does not work. To do what you desire, tou have to write a script and do it in much the same way at shown in my answer for question 1. The scripting guide has a good troubleshooting section on what to do when "nothing happens" after you write a script.

____________
-------------
Mage of Soquim

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

Tavern Dweller
posted June 12, 2008 03:59 PM
Edited by LordLuther at 16:02, 12 Jun 2008.

Quote:

Question #1-- Unfortunately, the message you created for the creature stack is displayed after the stack is defeated, not before. You can make a message be displayed before the battle, but it is complicated to do this trick in H5 because you have to write a script to do it. And, while scripts for Multiplayer maps work fine, you have to use special multiplayer commands in your script, and the multiplayer commands are not documented.



First of all i wanted to thank you a real lot for trying to help me solve my problems Thanks a bundle ^^ realy apreciated.

But, (As you've seen i've Bolded a line said by you in my quote.) I heard something quite else about Scripts being able to work in a Multiplayer map, please read the following (Quoted from [url=http://forums.ubi.com/eve/forums/a/tpc/f/9211039784/m/3001053394?r=3001053394#3001053394]The Official Ubisoft Forum[/url]


quote:
Originally posted by DeejMaster1:
Makes me wonder how much work I have to look forward to, especially since I am creating a Cooperative Multiplayer Quest-based Map with an indepth story line.


if when you created your map, and you selected "multiplayer" then you will not be able to script it at all.
scripts, events, seer quest huts, messageboxes(youll have to use signposts instead), everything is disabled for multiplayer maps.
you can only have scripts for single player made maps.



So now i'm quite puzzled, i have tried to enter some usual scipts with the aid of the guide you pointed me at, yet nothing really worked..


Also, my brother troubled me with another big question:
For i'm a great lover of detaill, i love to place multiple doo-dads on the same spot to give a nice look to the envoirement, now my brother told me a map editor (in his case, the one of WarCraft III)
could have an specific Maximum amount of doo-dads the map or game can handle, and that in time you can't place any more doo-dads (like trees or flowers) on the map when you have reached limits. I've been looking into all the guides you get with the game though none of them made a clear answer.

#3 Does the Map Editor of HoMM 5 HoF version have a maximum amount of doo-dads? (trees and flowers and so on.)
____________
-LordLuther

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


Known Hero
Wyld Mapper
posted June 12, 2008 04:43 PM
Edited by rdeford at 16:47, 12 Jun 2008.

Quote:
Quote:

Question #1-- Unfortunately, the message you created for the creature stack is displayed after the stack is defeated, not before. You can make a message be displayed before the battle, but it is complicated to do this trick in H5 because you have to write a script to do it. And, while scripts for Multiplayer maps work fine, you have to use special multiplayer commands in your script, and the multiplayer commands are not documented.



First of all i wanted to thank you a real lot for trying to help me solve my problems Thanks a bundle ^^ realy apreciated.

But, (As you've seen i've Bolded a line said by you in my quote.) I heard something quite else about Scripts being able to work in a Multiplayer map, please read the following (Quoted from asThe Official Ubisoft Forum


quote:
Originally posted by DeejMaster1:
Makes me wonder how much work I have to look forward to, especially since I am creating a Cooperative Multiplayer Quest-based Map with an indepth story line.


if when you created your map, and you selected "multiplayer" then you will not be able to script it at all.
scripts, events, seer quest huts, messageboxes(youll have to use signposts instead), everything is disabled for multiplayer maps.
you can only have scripts for single player made maps.



So now i'm quite puzzled, i have tried to enter some usual scipts with the aid of the guide you pointed me at, yet nothing really worked..


Also, my brother troubled me with another big question:
For i'm a great lover of detaill, i love to place multiple doo-dads on the same spot to give a nice look to the envoirement, now my brother told me a map editor (in his case, the one of WarCraft III)
could have an specific Maximum amount of doo-dads the map or game can handle, and that in time you can't place any more doo-dads (like trees or flowers) on the map when you have reached limits. I've been looking into all the guides you get with the game though none of them made a clear answer.

#3 Does the Map Editor of HoMM 5 HoF version have a maximum amount of doo-dads? (trees and flowers and so on.)


OK, first, with H5 original, and the HOF expansion, you could not do scripting for multi-player maps, so the postings saying that are correct for that time period. But with the TotE expansion you can write scripts for multi-player maps. Here is some info on the new, undocumented, multi-player functions: http://www.celestialheavens.com/forums/viewtopic.php?t=8744

However, because of the lack of good documentation for multi=player functions, I strongly suggest you learn how to write H5 scripts on a single-player map.

Second, as far as I know, there is no limit to the number of doo-dads you can place on a H5 map. I've made some very detailed, large maps and have not had a problem. However, the map loading times get longer and longer as you add more and more stuff. On slower computers, your map's players might get discouraged. Also, there is indirect evidence that suggest that very complex scenery and highly elevated terrain can slow game play down on slow computers.

Third, as far as your scripts not working... make sure you enable the console (as detailed in the Scripting Guide). Then, look at the error messages you get when you try to play your map. You must work methodically on your script until the game can compile it without errors or the game won't run your script at all for most errors.

Fourth, I am very interested in seeing more H5 map makers creating new maps. I am in the process of authoring a tutorial on scripting, but it is going slowly because of other duties. So, in the mean time, please send me a copy of your map by email and I will get your script to work and write you a report on what I did. Send the map as an attachment to: rdeford@dragonfarm.us



____________
-------------
Mage of Soquim

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

Tavern Dweller
posted June 14, 2008 09:51 AM

Quote:
Fourth, I am very interested in seeing more H5 map makers creating new maps. I am in the process of authoring a tutorial on scripting, but it is going slowly because of other duties. So, in the mean time, please send me a copy of your map by email and I will get your script to work and write you a report on what I did. Send the map as an attachment to: rdeford@dragonfarm.us



I again thank you alot for your help i'll do my best to finish my first made in Heroes V map editor Map. Even though it's a multiplayer map (which means no scripts), i would like to publish it on the forum here as a thanks for your help, and, perhaps, for testing, to look at the faults that you see while playing it.

Even though i've only cleared 56% of the map, it already looks very nice, if i may say so myself , i guess lot's of Heroes 3 map editing experience did the trick

I hope i am able to publish my map on the forum..

-Lord Luther

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


Known Hero
Wyld Mapper
posted June 14, 2008 06:05 PM

Quote:
Quote:
Fourth, I am very interested in seeing more H5 map makers creating new maps. I am in the process of authoring a tutorial on scripting, but it is going slowly because of other duties. So, in the mean time, please send me a copy of your map by email and I will get your script to work and write you a report on what I did. Send the map as an attachment to: rdeford@dragonfarm.us



I again thank you alot for your help i'll do my best to finish my first made in Heroes V map editor Map. Even though it's a multiplayer map (which means no scripts), i would like to publish it on the forum here as a thanks for your help, and, perhaps, for testing, to look at the faults that you see while playing it.

Even though i've only cleared 56% of the map, it already looks very nice, if i may say so myself , i guess lot's of Heroes 3 map editing experience did the trick

I hope i am able to publish my map on the forum..

-Lord Luther


It is traditional for map makers to get one or more volunteers to beta test a map prior to publishing it. Beta testing is testing of a map that is supposed to be complete but not yet released. (Alpha testing is the testing of an incomplete map that is typically by the map maker.) The idea of beta testing is to ensure that a map is bug-free prior to letting the world see it.) If you wish, I will be your beta tester. Send it to me prior to publishing it on the forum and I will send you a tester's bug report so you can fix all problems before exposing it to the public.

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

Tavern Dweller
posted June 26, 2008 01:27 AM
Edited by Rerhero at 01:35, 26 Jun 2008.

Very Noob At Map Editor :X

Okay so... I've had prior experience with many map editors, I'm even blessed with the knowledge of 2 years of Computer Science.  However, the Heroes 5 Map Editor is killing me >_<.  Its not making the terrain or anything like that that is hard.  Its more "script oriented" stuff.  For example, here are a few things I'm trying to accomplish on my level. (Note that I have read all the files given to me to learn this stuff lol, just not all of it makes complete sense).  

1) Get the stupid objectives to show when playing that: I'm supposed to capture all towns and that my hero must survive.  (According to the manual I've set it up in Map Properties correct, but my descriptions and titles for the objectives won't show.  Also, when my main hero dies, it doesn't register the objective as a fail.  I believe I entered the correct "script name" in the parameter section of the objective, but it isn't registering.)

2) I need a slight explanation on how to make a message pop up when a hero steps into a "region", not very familiar with script at all in this game :X

3)... We should probably get 1 & 2 solved b4 I go onto 3 lol.

My apologies for not knowing anything about the script in this game, but it seems that not many people know at all :X.  Also I'm sorry for so many questions, its just that I'm very interested in Map Editor (always have been) and want to be successful in creating a great map.

Note: I don't have TotE yet, only Heroes 5 and HoF
____________
That guy who wishes he knew everything, owns at WoW, and is very lazy

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


Known Hero
Wyld Mapper
posted June 26, 2008 02:36 AM
Edited by rdeford at 04:06, 26 Jun 2008.

Quote:
... Its more "script oriented" stuff.  For example, here are a few things I'm trying to accomplish on my level. (Note that I have read all the files given to me to learn this stuff lol, just not all of it makes complete sense).  

1) Get the stupid objectives to show when playing that: I'm supposed to capture all towns and that my hero must survive.  (According to the manual I've set it up in Map Properties correct, but my descriptions and titles for the objectives won't show.  Also, when my main hero dies, it doesn't register the objective as a fail.  I believe I entered the correct "script name" in the parameter section of the objective, but it isn't registering.)

2) I need a slight explanation on how to make a message pop up when a hero steps into a "region", not very familiar with script at all in this game :X

3)... We should probably get 1 & 2 solved b4 I go onto 3 lol.

My apologies for not knowing anything about the script in this game, but it seems that not many people know at all :X.  Also I'm sorry for so many questions, its just that I'm very interested in Map Editor (always have been) and want to be successful in creating a great map.

Note: I don't have TotE yet, only Heroes 5 and HoF


General comment: The official documents are not good enough. Download and read the The Basics of Heroes V Scripting ver. 2.0 for H5, HOF, & ToTE from Celestial Heavens before attempting to do any more H5 scripting.  Get it here: http://www.celestialheavens.com/viewpage.php?id=567

Regarding objectives: To get the descriptions and titles to show up, you must set the values of the IsInitialyActive and IsInituialyVisible to True. And, of course you must have created resource files for them, which I assume you have done.

Regarding the hero name for the Object_Kind-Hero_Must_Survive objective, you cannot use the normal hero name nor can you use the scripting name you give the hero. Instead you must use the hard-coded internal hero name. The scripting guide I mentioned earlier gives the internal name for all the heroes.

Regarding getting a message to pop up when a hero enters a region. The general directions for doing it are:

1) Create a resource text file that contains the text you wish the message box to display. (Again, the scripting guide tells how to do it.)

2) Create the region on your map and give it a scripting name. For example: Rgn1

3) Define a function to use the MessageBox()command in your script. Make sure you use the complete game path ending with the filename.txt as the argument for the MessageBox() command. Then, trigger that function with the REGION_ENTER_AND_STOP_TRIGGER trigger. For example,

function monsterWarning()
 MessageBox("Maps/SingleMissions/JackdawJake/monsterWarning.txt");
 Trigger (REGION_ENTER_AND_STOP_TRIGGER, "Rgn1", nil );
end;
 Trigger (REGION_ENTER_AND_STOP_TRIGGER, "Rgn1", "monsterWarning" );

Download maps by other people and study the scripts. For example, my map The Virgin Of Ponce, Episode 1, does the things you wish to do. But, as mentioned in the scripting guide, it is nearly impossible to write working H5 scripts without enabling the developer's console to see your compilation errors. Even a single trivial compilation error can prevent the entire script from working.

 









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

Tavern Dweller
posted June 26, 2008 03:07 AM

Thank you very much, I'll take this advice, download the information and see what I can do.  Should I have further questions I'll make sure to come back here and ask you ^_^b.

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


Known Hero
Wyld Mapper
posted June 26, 2008 04:08 AM

Quote:
Thank you very much, I'll take this advice, download the information and see what I can do.  Should I have further questions I'll make sure to come back here and ask you ^_^b.


You are welcome.

Oops, I made an error in my example given previously. Notice that I have edited my message by changing this line:

Trigger (REGION_ENTER_AND_STOP_TRIGGER, "Rgn1", nil );



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


Known Hero
Wyld Mapper
posted June 26, 2008 05:09 PM

Quote:
Hi all!

I've just install the HVtoe (version 3.0) to my brand new notebook with vista, but there are problems with it. With the map editor not the game. I tried the editor but it can't open(with editor open button) and load maps. When i try to push "open file", the editor exits itself. When i make a map, i check it- everything seems godd, well-formed map - and save it, the map's size will decrease to 22bytes.(in the maps folder) This is the same when i donwload a map and open the editor and the save it. When i try to load a map i created i get a message:
Can't load ... Heroes of Might and Magic - Tribes of the East/Maps/xyz.h5m file (the file may be corrupted, file version unsupported or you are trying to load the map from outside the [Game installation folder]/Maps folder)
The game is original, there is no virus, and the files are in the maps folder, so i dunno what should i do? PLS help me someone


Ubisoft says that the game is not 100% compatible with Vista. My wife has Vista on her machine and, like you, she can play the game and my home-made maps. I tried once to use the H5 map editor on her computer and experienced some problems that were more or less the same as yours, but not as extreme. There is not likely to be a cure for this problem until Ubisoft does a TotE patch, and maybe not even then.

I think we should send Ubisoft support some complaints. (Don't laugh!) It might help them come up with a Vista compatibility patch.

Meanwhile, you might try setting up your computer with a dual operating system where you can boot up in either Vista or XP.

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

Tavern Dweller
posted July 04, 2008 05:16 AM
Edited by xerius at 06:52, 04 Jul 2008.

hi, sorry for reviving dead thread but i need help!

I made a multi player map, but when I try to start the game its gray. everyone is ready but still I cant start it. Do i need to do something?
somehow when i tested before it worked but now it doesnt i changed few stuff thought.

can you help quick please! we wanna start asap

edit: and when i do "check map" it says everything is fine.
edit2: I have tote, first I generated a randome multiplayer map in game, then I exited the game, started editor and opened the map I made in game. I spend 1-2 days editing it to my liking fixed all problems saved tried it ones worked. also got this message when saved "As you've changed this map, rmg marker will be lost and multiplayer regeneration won't work."
today I opened the map with editor did some more fixing and stuff but saved it went into the game but the button start game stays gray :/
tried all kinds of stuff to fix it but nothing worked.
Now Im sad cause I wasted 3 days on making it and now it wont work

If anyone knows a way I can fix this PLEASE HELP

Edit3: I very tired so what i wrote above might be a little hard to understand sorry for that. Im gonna go sleep now and dream that problem goes away. also we had to play some randome generated map with mates. if there is no cure for this problem I will be depressed lol. spent around 20 hours editing it.

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


Promising
Legendary Hero
fallen artist
posted July 04, 2008 02:33 PM

Since I've never written a h5 script and the map I develop atm requires one, here's my question:

How to add a creatures to garrisson every day / week depending of the number of days / weeks / months past?

I believe I could learn a lot from this simple example.
Thanks in advance!

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


Known Hero
Wyld Mapper
posted July 04, 2008 05:28 PM
Edited by rdeford at 17:47, 04 Jul 2008.

@ Xerius -- Take a look at the Map Properites, Teams. Make sure that Teams is checked. Then set the teams correctly, even if one or more teams has only one player, or they all do that's OK.

If that doesn't fix the problem, go to the Players properties and reset each one to the values you desire. Do them all one at a time.

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


Known Hero
Wyld Mapper
posted July 04, 2008 05:47 PM

@Warmonger -- The answer to your question is fairly simple if you already know how to write H5 scripts. Since you are new, then you need to prepare your self to understand the answer. Download the

"The Basics of Heroes V Scripting ver. 2.0 for H5, HOF, & ToTE"  

guide from here:http://www.celestialheavens.com/viewpage.php?id=567

Read this guide then maybe the general procedure I give below will make sense to you. If it doesn't post your question again, and I will do the code for you in detail, but you will have to know the basics of writing scripts to use it with impunity.

1) Create a function that adds creatures to the garrison. Use one or more if/then commands inside it that detect a day of the week and adds the creatures.

2) Make that function a sub-function in a different function that is triggered daily.

There is a discussion on the CH forum that is close to what you desire. Look here on page 32: http://www.celestialheavens.com/forums/viewtopic.php?t=3793&postdays=0&postorder=asc&start=465

If you wish an good example, study the scripts that other people have written. For example, my map, Mining Tycoon, has a triggered daily function dawn() that has several sub-functions that do tasks similar to what you are trying to do. You can get my maps from CH or Maps4Heroes.

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


Promising
Legendary Hero
fallen artist
posted July 04, 2008 06:22 PM
Edited by Warmonger at 18:23, 04 Jul 2008.

Ok, here's what I came up with:

Quote:
function everyday ()
supergate ()
end;

function supergate ()
 AddObjectCreatures(Supergate, CREATURE_FIRE_ELEMENTAL, WEEK);
 AddObjectCreatures(Supergate, CREATURE_WATER_ELEMENTAL, WEEK);
 AddObjectCreatures(Supergate, CREATURE_AIR_ELEMENTAL, WEEK);
 AddObjectCreatures(Supergate, CREATURE_EARTH_ELEMENTAL,WEEK);
 AddObjectCreatures(Supergate, CREATURE_PHOENIX, MONTH);
  end;


It doesn't trigger yet, but is supposed to generate creatures every day, whose amount depends of the game week / months.
I'd like to put theme on multiple garrissons to make them passable for only one player.
Any1 remembers Chronic Peripetia?

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


Known Hero
Wyld Mapper
posted July 04, 2008 08:22 PM
Edited by rdeford at 20:23, 04 Jul 2008.

Quote:
Ok, here's what I came up with:

Quote:
function everyday ()
supergate ()
end;

function supergate ()
 AddObjectCreatures(Supergate, CREATURE_FIRE_ELEMENTAL, WEEK);
 AddObjectCreatures(Supergate, CREATURE_WATER_ELEMENTAL, WEEK);
 AddObjectCreatures(Supergate, CREATURE_AIR_ELEMENTAL, WEEK);
 AddObjectCreatures(Supergate, CREATURE_EARTH_ELEMENTAL,WEEK);
 AddObjectCreatures(Supergate, CREATURE_PHOENIX, MONTH);
  end;


It doesn't trigger yet, but is supposed to generate creatures every day, whose amount depends of the game week / months.
I'd like to put theme on multiple garrissons to make them passable for only one player.
Any1 remembers Chronic Peripetia?


OK, Warmonger,

Several things...

First, you must enable the console and test your work. See the scripting guide for the instructions on how to do it. You will not get past the first function you write without checking for errors with the game's script compiler. The editor's Check command is worthless and you may disregard all errors it generates. I haven't checked your code with the game and console, but I can see several errors off the top of my head:

1-- Every command line must end in a semicolon, as in:
supergate();

2-- You need to use the GetDate() function to get the value for your quantity. For example:

AddObjectCreatures(Supergate, CREATURE_FIRE_ELEMENTAL, GetDate(WEEK));

And, you'll need one such command for each garrison you wish to add creatures to. (But see #5 for a different approach.)

4-- the trigger for your main function will look like this:

 Trigger(NEW_DAY_TRIGGER, "everyday");

5-- You must give the target garrison object a script name in the map's Property Tree so you can refer to it in your script. I take it that you have already done this chore and given the garrison object the name Supergate. Of course, you'll have to give every garrison you wish to add creatures to a unique scripting name. For example: Supergate1, Supergate2, etc. Such a naming convention will allow you to use a for loop's index value and concatenation to service all your garrisons with a single command if you don't want to write a separate command for each garrison.

Caution: I have not checked any of my examples with the game and console. I may have made an error, and even the most trivial syntax error, or a single typo can stop your script from running at all.

As for making garrisons passable for only one player, simply make that player the owner of the garrison by setting the value of its PlayerID property to the particular player you wish to be able to pass freely. (The other players will have to fight the creatures to pass.) You may also wish to set the CollectableArmy property to false as well to prevent the owner-player from removing the creatures and putting them into a hero army.

I hope all this helps. Good luck with H5 scripting. It has a steep learning curve, but the rewards are well worth the climb in my opinion.

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 43 pages long: 1 2 3 4 5 ... 10 20 30 ... 39 40 41 42 43 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1914 seconds