[H5 EDITOR] Troubleshooting topic
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
Haven't tried this, so I'm not positive it works for heroes.
SetObjectPosition(objectName, x, y, floor = -1);
Description
This function instantly moves the object into the position specified by the tile coordinates and floor number. If the floor parameter is not specified in the invocation of the function, the object’s current floor will be used by default. Only mobile objects can be moved. If the target position is inaccessible, occupied with another object, or is an interactive tile of another object, the function generates an error.
objectName – the object’s name
x, y – the target tile’s coordinates
floor – floor number (equal to -1 by default, which means ‘same’)
GOW
SetObjectPosition(objectName, x, y, floor = -1);
Description
This function instantly moves the object into the position specified by the tile coordinates and floor number. If the floor parameter is not specified in the invocation of the function, the object’s current floor will be used by default. Only mobile objects can be moved. If the target position is inaccessible, occupied with another object, or is an interactive tile of another object, the function generates an error.
objectName – the object’s name
x, y – the target tile’s coordinates
floor – floor number (equal to -1 by default, which means ‘same’)
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."
I have used it successfully (ruins in the desert map)Grumpy Old Wizard wrote:Haven't tried this, so I'm not positive it works for heroes.
should be
Code: Select all
function teleport (heroname)
if heroname == "main heroname" then -- well the hard coded name of main hero, not "main heroname"
SetObjectPosition (heroname, x, y, z); -- position where to teleport. IMO floors (z) were either 0 or 1
MessageBox("text FOR main hero after he is teleported")
else
MessageBox("explaining that only main campaign hero may enter this area");
end;
end;
Avatar image credit: N Lüdimois
Most flustrating the HOF mapeditor is.. Grrrr.. Tried to post at Navil and they don't allow it.. so went to Ubisoft forums and tried to post there and same thing.. In fact the link to the forums on the main page is wrong, i got into them from a bookmark.
I am very flustrated having the map editor freeze my computer up. Even Ctrl Alt Del will not work so I have to do a soft boot. This is even without writing one line of code in the script box.
The only somewhat fix has been to remove all maps except the one I am working on from the maps directory, this at least slows down the crashes.
running a decent machine too. 2 GIG mem and a 2.5 processor. ATI 256 meg PCI Express card.
Any one have any cures?
I am very flustrated having the map editor freeze my computer up. Even Ctrl Alt Del will not work so I have to do a soft boot. This is even without writing one line of code in the script box.
The only somewhat fix has been to remove all maps except the one I am working on from the maps directory, this at least slows down the crashes.
running a decent machine too. 2 GIG mem and a 2.5 processor. ATI 256 meg PCI Express card.
Any one have any cures?
-
- Leprechaun
- Posts: 7
- Joined: 12 Feb 2007
- Location: Brazil
I have an unusual question about scripts:
Has anyone tried to make a player to win when a given hero dies?
I´ve used this weird script below, unsucessfully:
function dead(heroname)
while IsHeroAlive("hn") do
if IsHeroAlive ("hn") == nil then
win();
sleep(10)
end;
end;
StartThread(dead);
It´s obvious that something wrong, because it didn´t work... but I cannot see what´s wrong. Any ideas?
Has anyone tried to make a player to win when a given hero dies?
I´ve used this weird script below, unsucessfully:
function dead(heroname)
while IsHeroAlive("hn") do
if IsHeroAlive ("hn") == nil then
win();
sleep(10)
end;
end;
StartThread(dead);
It´s obvious that something wrong, because it didn´t work... but I cannot see what´s wrong. Any ideas?
The simplest would probably be (works for me)grindcardoso wrote: Has anyone tried to make a player to win when a given hero dies?
Code: Select all
Trigger(PLAYER_REMOVE_HERO_TRIGGER, PLAYER_1, 'wictory');
function wictory()
if IsHeroAlive("Agrael") == nil then
Win();
end;
end;
PS. I understand that the hero has to belong to human player and not to the AI.
Avatar image credit: N Lüdimois
-
- Leprechaun
- Posts: 7
- Joined: 12 Feb 2007
- Location: Brazil
Thanks! I´ll try it today as soon as I get home...
Another question:
When I try to invoke a Message Box in a Random Generated Map, the .txt file is saved in a directory like this "Maps/RMG/132.456.4546.14598/ xxx.txt", and well, it doesn´t work at all.
When a do the same thing in a fully customized map (made from scracth, a "new" map), it is saved in "Maps/SingleMissions/made_from_scratch.txt", and it works perfectly.
I wonder what´s wrong.
Maybe should I create a "SingleMissions" folder inside RMG directory, and then put the .txt files in there?
Another question:
When I try to invoke a Message Box in a Random Generated Map, the .txt file is saved in a directory like this "Maps/RMG/132.456.4546.14598/ xxx.txt", and well, it doesn´t work at all.
When a do the same thing in a fully customized map (made from scracth, a "new" map), it is saved in "Maps/SingleMissions/made_from_scratch.txt", and it works perfectly.
I wonder what´s wrong.
Maybe should I create a "SingleMissions" folder inside RMG directory, and then put the .txt files in there?
No experiences with RMG, but I suspect the scripts are limited to SingleMissons only. Can you launch any other script commands on randomly generated maps? If not, then you surely must rename it to single player (Unzip the mapp file and *rename* RMG directory to SingleMissions and in message box references use Maps/SinleMissions?mymap?myfile.txt address). If you can launch other script commands on a RMG map you can try the following: A) unzip map file and replace the 123.245.678 with a normal dot-less name. B) Make sure the text file is not misplaced or with misspelled name C) if you did the txt file externally and copied into zip file, remove it and make a new file using the editor.grindcardoso wrote: "Maps/RMG/132.456.4546.14598/ xxx.txt", and well, it doesn´t work at all.
No more ideas at the moment.
@ Vlaad II. You probably need to ask Vitirr. Or download his map (very bottom of first post http://forums.ubi.com/eve/forums/a/tpc/ ... 1181010694 )and try to figure it out by yourself
Avatar image credit: N Lüdimois
-
- Leprechaun
- Posts: 7
- Joined: 12 Feb 2007
- Location: Brazil
Yeah, I'm familiar with Vitirr's work. Actually, it was that very thread which prompted me to try it in the first place.Pitsu wrote:@ Vlaad II. You probably need to ask Vitirr. Or download his map (very bottom of first post http://forums.ubi.com/eve/forums/a/tpc/ ... 1181010694 )and try to figure it out by yourself
After some trial and error, the most obvious solution proved to be the best one.


P.S. Strangely, a dolmen turned into an obelisk. Gah.
Not sure about the birds, but some other modifications that Vitirr did on his demo map affect all maps. To retur to normal, remove the customized map from your map directory. But you perhaps already knew how these things go...Vlaad II wrote: P.S. Strangely, a dolmen turned into an obelisk. Gah.
Avatar image credit: N Lüdimois
Yes, I was aware the changes might affect other files, but was keeping my fingers crossed... Blah. Surprisingly enough, two customized Military Posts haven't messed up anything, but the birds did. Perhaps it's only map properties...?Pitsu wrote:Not sure about the birds, but some other modifications that Vitirr did on his demo map affect all maps. To retur to normal, remove the customized map from your map directory. But you perhaps already knew how these things go...Vlaad II wrote: P.S. Strangely, a dolmen turned into an obelisk. Gah.
I'll have to compare notes with Vitirr.
This is a problem I have had since the editor was released and someone said that all you had to do was click the Soft button and then the Fills would cover 100% of the area you indicated.
Well, two problems. First off, the only Soft button is in the Tiles tab, not the Fills tab and second, I clicked Soft, set it to different strengths and then tried to fill an area. It is still not covering the entire area. I could still walk through with a hero if I so chose to.
How do you get this thing to actually fill all 100% of the area you indicated? And no, that Mask option to block things, even though you see an opening is not an option for what I need to do.
Well, two problems. First off, the only Soft button is in the Tiles tab, not the Fills tab and second, I clicked Soft, set it to different strengths and then tried to fill an area. It is still not covering the entire area. I could still walk through with a hero if I so chose to.
How do you get this thing to actually fill all 100% of the area you indicated? And no, that Mask option to block things, even though you see an opening is not an option for what I need to do.
-
- Leprechaun
- Posts: 7
- Joined: 12 Feb 2007
- Location: Brazil
Well, I was very excited about the possibility of making my own campaign. I´ve followed all the instructions posted by Neckie on http://elrath.com/forums/index.php?showtopic=615, but guess what, it didn´t work.
I put all my map files and the campaign files in the "C:\Program Files\Ubisoft\Heroes of Might and Magic V\Mods" folder, but still cannot see my map when trying to assign it as a campaign map. Here:
http://img133.imageshack.us/my.php?imag ... on2eb7.jpg
My "Campaign" is not able to "see" my maps, can´t choose them. I´ve tried to contact Neckie as well as registering on Elrath.com forum to reach him, both unsucessfully.
Can anyone give me a hand on this? Could anyone make a campaign?
Thanks in advance.[/img]
I put all my map files and the campaign files in the "C:\Program Files\Ubisoft\Heroes of Might and Magic V\Mods" folder, but still cannot see my map when trying to assign it as a campaign map. Here:
http://img133.imageshack.us/my.php?imag ... on2eb7.jpg
My "Campaign" is not able to "see" my maps, can´t choose them. I´ve tried to contact Neckie as well as registering on Elrath.com forum to reach him, both unsucessfully.
Can anyone give me a hand on this? Could anyone make a campaign?
Thanks in advance.[/img]
"Glória do desporto nacional ó Internacional que eu vivo a exaltar" - Sport Club Internacional Anthem
you might want to wait until the next patch comes out, i have heard that it will finally support making campaigns.
of course, who knows when nival will ever release that patch, or if the campaign editor will even work properly:)
i have a question too.
im trying to use the settownbuildinglimit command.
first i use the transform town spell and turn a town into a necropolis.
by doing this, all existing buildings are destroyed, and the newly transformed town has no structures.
what i want is for the newly transformed town to already have an undead converter.
so i used this command
SetTownBuildingLimitLevel( "town", TOWN_BUILDING_SPECIAL_2, 1);
im actually not even sure if town special 2 is the right code for undead converter, since none of the codes match.
i even tried putting a value of "2" instead of "1", but no matter what i do, the undead converter never gets built.
anyone know what i should do?
of course, who knows when nival will ever release that patch, or if the campaign editor will even work properly:)
i have a question too.
im trying to use the settownbuildinglimit command.
first i use the transform town spell and turn a town into a necropolis.
by doing this, all existing buildings are destroyed, and the newly transformed town has no structures.
what i want is for the newly transformed town to already have an undead converter.
so i used this command
SetTownBuildingLimitLevel( "town", TOWN_BUILDING_SPECIAL_2, 1);
im actually not even sure if town special 2 is the right code for undead converter, since none of the codes match.
i even tried putting a value of "2" instead of "1", but no matter what i do, the undead converter never gets built.
anyone know what i should do?
-
- Leprechaun
- Posts: 7
- Joined: 12 Feb 2007
- Location: Brazil
I think I´ve made something stupid, people.
You know when you browse in the toolbar where there are the "objects" to be put on the map´s surface? I don´t know what I did wrong, but, well the "objects" in the toolbar are gone... as simple as that, nothing appears on the right side of the screen anymore. Have anyone experienced this before? If yes, please tell me what is to be done to fix it.
You know when you browse in the toolbar where there are the "objects" to be put on the map´s surface? I don´t know what I did wrong, but, well the "objects" in the toolbar are gone... as simple as that, nothing appears on the right side of the screen anymore. Have anyone experienced this before? If yes, please tell me what is to be done to fix it.
"Glória do desporto nacional ó Internacional que eu vivo a exaltar" - Sport Club Internacional Anthem
@myythryyn : That command is to set the town building level required to build a certain building in a given town. But in the documentation it says it can't be lower than the usual one.
You would like to build a building... but its impossible given the script functions we have. If you have empty space on your map you could try the old move town trick. (Put it somewhere then move it instead of transform and change the town owner from neutral to the good player ID) Dunno if it would work but worth trying I think.
@grindcardoso : About the campaign thing, you can pm me if you want to contact me. I'll look at it next week. About the editor thing I think all you have to do is go to (in the menu):
View -> Tools Panel
You would like to build a building... but its impossible given the script functions we have. If you have empty space on your map you could try the old move town trick. (Put it somewhere then move it instead of transform and change the town owner from neutral to the good player ID) Dunno if it would work but worth trying I think.
@grindcardoso : About the campaign thing, you can pm me if you want to contact me. I'll look at it next week. About the editor thing I think all you have to do is go to (in the menu):
View -> Tools Panel
King Imp wrote:This is a problem I have had since the editor was released and someone said that all you had to do was click the Soft button and then the Fills would cover 100% of the area you indicated.
Well, two problems. First off, the only Soft button is in the Tiles tab, not the Fills tab and second, I clicked Soft, set it to different strengths and then tried to fill an area. It is still not covering the entire area. I could still walk through with a hero if I so chose to.
How do you get this thing to actually fill all 100% of the area you indicated? And no, that Mask option to block things, even though you see an opening is not an option for what I need to do.
Based on the no responses, I'm assuming there isn't a way to actually do this. Am I right or wrong?
-
- Leprechaun
- Posts: 7
- Joined: 12 Feb 2007
- Location: Brazil
Gurizada ("hey guys" in portuguese),
Another question for the experts in mapmaking:
On the map I have three bridges, and a stack of Pit Lords hidden somewhere, I want to fortify the bridges also with Pit Lords, but trick are two:
1) The bridge keepers must have the same amount of creatures of the hidden Pit Lord;
2) By the day 2 and 4 of each week I want to increase the number of the hidden Pit Lord (plus 1 each two days);
Can anyone help me?
Many thanks!
Another question for the experts in mapmaking:
On the map I have three bridges, and a stack of Pit Lords hidden somewhere, I want to fortify the bridges also with Pit Lords, but trick are two:
1) The bridge keepers must have the same amount of creatures of the hidden Pit Lord;
2) By the day 2 and 4 of each week I want to increase the number of the hidden Pit Lord (plus 1 each two days);
Can anyone help me?
Many thanks!
"Glória do desporto nacional ó Internacional que eu vivo a exaltar" - Sport Club Internacional Anthem
Who is online
Users browsing this forum: Bing [Bot] and 0 guests