Aren't the "lootable" commands, particularly SetHeroLootable(heroname, enable/nil) for that? Never tried myself.myythryyn wrote:hi, any way to stop the player from recieving enemy AI hero's artifacts after battle?
[H5 EDITOR] Troubleshooting topic
Aaaargh, my vampire quest still doesn't work. When I activate it, it appears in the Objective screen but when the thread containing the objective progress update starts nothing happens (the progress stays on "progress 0") ans the console give me a line which says :
(sic)
I tried to delete the objective and create it again from scratch, change its name, try to have it activated from the beginning but invisible, it still says it doesn't exist...
Here a copy-paste of the script in its last version :
I'm thinking of forgetting the "progress states" because it's really getting on my nerves now...
Code: Select all
ERROR : objective "quest3" is not exists
I tried to delete the objective and create it again from scratch, change its name, try to have it activated from the beginning but invisible, it still says it doesn't exist...
Here a copy-paste of the script in its last version :
Code: Select all
oldvalue=0;
----------------------------------------------
function quest_cabin()
if GetCurrentPlayer ()==PLAYER_1 then
MessageBox("Maps/SingleMissions/B1C4/vempirehunters-beginning.txt");
SetObjectiveState ("quest3", OBJECTIVE_ACTIVE);
startThread(vampquest);
Trigger(OBJECT_TOUCH_TRIGGER, "cabin", "cabin_end");
end;
end;
---------------------------------------------
function vampquest()
while GetObjectiveState("quest3", OBJECTIVE_ACTIVE) do
killed = 0;
for i= 1, 4 do
if IsObjectExists("vamp"..i) == nil then
killed = killed +1;
end;
end;
if oldvalue ~= killed then
oldvalue = killed;
SetObjectiveProgress ("quest3", killed);
end;
sleep(5);
end;
end;
I just want to report a weird bug I had with the editor the other day. I was testing a map in HoF, noticed a few bugs and the like, nothing out of the ordinary so far. Then I opened the map in the editor and the rotation parameter of nearly all objects on the map was messed up. I had to manually reset all of them, it took me a (somewhat depressing...) hour. It had never happened before and didn't since (fingers crossed).
I wonder if someone else had this bug or has an idea what triggered it ?
I wonder if someone else had this bug or has an idea what triggered it ?
I have similar problem... All began after the installation of patch 1.4. When I open my map in the editor, do no changes, then close the editor, size of the map is changed and some of the scripts stop working! Fortunately I always make a backup of my maps. There is something veeeery bad in the editor that came with patch 1.4 (or HoF, if you have it installed).
My Heroes V map: Tales of Silentia
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
Under player properties you could reserve all the other heroes for a nonplayable color. For example stick a teal hero in an underground closed in room and reserve all the heroes you don't want appearing in a tavern for the teal player.meows wrote:I have a query guys.. I want Taverns that are empty. I went in the map properties and unchecked all heros, but yet Heros can still be hired. I thought there was a Campaign that had empty Taverns.
Any one have any Ideas?
I haven't tried it but it should work.
If there is only one playable position you could also reserve the heroes for that position and they shouldn't show up in the tavern.
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."
MANY MANY Thanks!
[quote="Grumpy Old Wizard]Under player properties you could reserve all the other heroes for a nonplayable color. For example stick a teal hero in an underground closed in room and reserve all the heroes you don't want appearing in a tavern for the teal player.
I haven't tried it but it should work.
If there is only one playable position you could also reserve the heroes for that position and they shouldn't show up in the tavern.
GOW[/quote]
Yes it kinda works, however after about 20ish heroes are reserved all you get is a choice of Haven or Academy heroes.. so you really can't reserve all heroes/.. but I found a workaround,, just disable the Tavern and have it do something else..
Now for my next problem.. I set a secondary objective to kill neutrals
i placed 3 stacks of wolves and in the
Parameters
Objectives.Secondary.Common.Objectives.[0].Parameters.[0] 113
Objectives.Secondary.Common.Objectives.[0].Parameters.[1] 75
I added 2 and put 113 in the first for the wolves and 75 in the second property box to kill 75 wolves.. However all you have to do it kill one stack of wolves and you win the objective..
How do i get it to wait untill they kill the 75 wolves other than making it one stack of 75?
EDIT:: Woops I reread the thread here and found my error.. So I went in and named 7 stacks of wolves
wolf1
wolf2
etc and added Parameters for each stack and put the names in, and what do you know. it worked.. and even counted the stacks down.. However. one more stack of mobs had to be killed after the 7 stacks of wolves for the objective to complete it's self.. But I can live with that..
[quote="Grumpy Old Wizard]Under player properties you could reserve all the other heroes for a nonplayable color. For example stick a teal hero in an underground closed in room and reserve all the heroes you don't want appearing in a tavern for the teal player.
I haven't tried it but it should work.
If there is only one playable position you could also reserve the heroes for that position and they shouldn't show up in the tavern.
GOW[/quote]
Yes it kinda works, however after about 20ish heroes are reserved all you get is a choice of Haven or Academy heroes.. so you really can't reserve all heroes/.. but I found a workaround,, just disable the Tavern and have it do something else..
Now for my next problem.. I set a secondary objective to kill neutrals
i placed 3 stacks of wolves and in the
Parameters
Objectives.Secondary.Common.Objectives.[0].Parameters.[0] 113
Objectives.Secondary.Common.Objectives.[0].Parameters.[1] 75
I added 2 and put 113 in the first for the wolves and 75 in the second property box to kill 75 wolves.. However all you have to do it kill one stack of wolves and you win the objective..
How do i get it to wait untill they kill the 75 wolves other than making it one stack of 75?
EDIT:: Woops I reread the thread here and found my error.. So I went in and named 7 stacks of wolves
wolf1
wolf2
etc and added Parameters for each stack and put the names in, and what do you know. it worked.. and even counted the stacks down.. However. one more stack of mobs had to be killed after the 7 stacks of wolves for the objective to complete it's self.. But I can live with that..
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
In the below thread I give an example of how to set up a bounty hunter quest for killing 3 neutral stacks of mages. Scroll down the thread about 8 posts until you see my post with pictures. That should work setting up what you want to do for your stacks of wolves.meows wrote: Now for my next problem.. I set a secondary objective to kill neutrals
i placed 3 stacks of wolves and in the
Parameters
Objectives.Secondary.Common.Objectives.[0].Parameters.[0] 113
Objectives.Secondary.Common.Objectives.[0].Parameters.[1] 75
I added 2 and put 113 in the first for the wolves and 75 in the second property box to kill 75 wolves.. However all you have to do it kill one stack of wolves and you win the objective..
How do i get it to wait untill they kill the 75 wolves other than making it one stack of 75?
EDIT:: Woops I reread the thread here and found my error.. So I went in and named 7 stacks of wolves
wolf1
wolf2
etc and added Parameters for each stack and put the names in, and what do you know. it worked.. and even counted the stacks down.. However. one more stack of mobs had to be killed after the 7 stacks of wolves for the objective to complete it's self.. But I can live with that..
viewtopic.php?t=4112&highlight=quest+bounty
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."
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
I remember when making my HOMM5 map that there was a "Question Box" option but no documentaion on it. Has anyone successfully used Question Box?
Maybe the next patch will address whatever the problem with the editor is.
Quite a distrubing report. And here I am thinking about starting another map soon.alavris wrote:I have similar problem... All began after the installation of patch 1.4. When I open my map in the editor, do no changes, then close the editor, size of the map is changed and some of the scripts stop working! Fortunately I always make a backup of my maps. There is something veeeery bad in the editor that came with patch 1.4 (or HoF, if you have it installed).

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'll sure start making no new map until new patch is released. There's just too much risk to do it now, with 1.4 Editor.Grumpy Old Wizard wrote:Quite a distrubing report. And here I am thinking about starting another map soon.Maybe the next patch will address whatever the problem with the editor is.
My Heroes V map: Tales of Silentia
AbsolutelyGrumpy Old Wizard wrote:I remember when making my HOMM5 map that there was a "Question Box" option but no documentaion on it. Has anyone successfully used Question Box?
QuestionBox("Maps/SingleMissions/mapname/textfile name", "function_that_runs_IF _player_clicks_Yes");
Last time when I wrote about commands that are not mentioned in editor I added also GetPlayerState(PLAYER_#) or GiveBorderguardKey (PLAYER_#, key#) to the list. Perhaps there are some more commands that work, but are not documented in official pdf.
Avatar image credit: N Lüdimois
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
Ah, thanks! That will prove to be quite useful.Pitsu wrote:QuestionBox("Maps/SingleMissions/mapname/textfile name", "function_that_runs_IF _player_clicks_Yes");
Last time when I wrote about commands that are not mentioned in editor I added also GetPlayerState(PLAYER_#) or GiveBorderguardKey (PLAYER_#, key#) to the list. Perhaps there are some more commands that work, but are not documented in official pdf.

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."
[quote="Grumpy Old Wizard"]I remember when making my HOMM5 map that there was a "Question Box" option but no documentaion on it. Has anyone successfully used Question Box?
Yes here is one that works great for me in my Ashers World Series.
The Question
Now for the options, if they Click yes or no.
Yes here is one that works great for me in my Ashers World Series.
The Question
Code: Select all
function cast_here_2()
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "cast_here", nil);
if GetCurrentPlayer () == PLAYER_1 then
HasArtefact("Ingvar",80);
QuestionBox("Maps/SingleMissions/Asher three2/questioncast_here.txt","callbackYes","callbackNo");
else
MessageBox ("Maps/SingleMissions/Asher three2/loose.txt");
end;
end;
Code: Select all
function callbackYes()
RemoveObject("mnt1",12,42,0);
RemoveObject("mnt2",13,48,0);
RemoveObject("mnt3",7,42,0);
SetObjectPosition("magethree",56,34,0);
MessageBox ("Maps/SingleMissions/Asher three2/cast_here.txt");
RemoveArtefact("Ingvar",80);
PlayVisualEffect( "/Effects/_(Effect)/Spells/FireBallHit.xdb#xpointer(/Effect)", "Ingvar" );
sleep (2);
MoveHero("Ingvar",16,43,-1);
SetRegionBlocked("townent", nil, 1);
SetObjectEnabled("Sonoma", true);
SetObjectOwner("Sonoma", PLAYER_1);
SetObjectEnabled("fort2", true);
MoveCamera(12,42.0,0,0,0);
PlayVisualEffect( "/Effects/_(Effect)/Spells/FireBallHit.xdb#xpointer(/Effect)", "Sonoma" );
sleep (2);
PlayVisualEffect( "/Effects/_(Effect)/Towns/Inferno/DemonGate.xdb#xpointer(/Effect)", "Sonoma" );
sleep (2);
PlayVisualEffect( "/Effects/_(Effect)/Spells/FireBallHit.xdb#xpointer(/Effect)", "Sonoma" );
sleep (2);
end;
function callbackNo()
MessageBox ("Maps/SingleMissions/Asher three2/loose.txt");
loose();
end;
----------------------- cast here ----------------------
hello, i need some help making a script.
first off, i remember reading that there is a way to teleport a hero to a map location. if that is so, then i will need to use that command, but dont know what the syntax it is, or how to use it.
here is what i need to do. i have a scripted area that is very important that only the campaign main hero enters. if any any other player controlled hero enters that area of the map, it will cause scripted events to act funny. also note that the map has to have secondary support heroes, so removing then and just having one main hero is not an option.
so i need to find a way to block any hero except the campaign main hero from entering the area. i was thinking of using the teleport script.
something like this, though of course this is just a rough draft -
function teleport (heroname)
get heroname;
if heroname is not equal to "main heroname" then
teleport ("heroname", location);
messagebox(explaining only main campaign hero may enter this area);
end;
could someone help me finalize this script? this is something im completely unfamiliar with and havnt played around with yet.
thxs for any help
first off, i remember reading that there is a way to teleport a hero to a map location. if that is so, then i will need to use that command, but dont know what the syntax it is, or how to use it.
here is what i need to do. i have a scripted area that is very important that only the campaign main hero enters. if any any other player controlled hero enters that area of the map, it will cause scripted events to act funny. also note that the map has to have secondary support heroes, so removing then and just having one main hero is not an option.
so i need to find a way to block any hero except the campaign main hero from entering the area. i was thinking of using the teleport script.
something like this, though of course this is just a rough draft -
function teleport (heroname)
get heroname;
if heroname is not equal to "main heroname" then
teleport ("heroname", location);
messagebox(explaining only main campaign hero may enter this area);
end;
could someone help me finalize this script? this is something im completely unfamiliar with and havnt played around with yet.
thxs for any help

Who is online
Users browsing this forum: No registered users and 0 guests