[H5 EDITOR] Troubleshooting topic
you might have to reword your question, im not sure what you are asking, maybe why no one has replied...meows wrote:I think I have a problem Houston, Is it just me or is there a problem with
garrison heros.. I garrison heros in enemy towns and now the game can't find my PLAYER_1 hero standing in front of his town once he captures it!
Is there something I need to do in the Map Properties?
Many thanks.
you are putting enemy AI garrisoned units in a town, and the player, PLAYER_1, attacks and captures the town killing the garrisoned AI hero, but the game cannot find the players hero afterwards? is that what you are asking?
myythryyn wrote:you might have to reword your question, im not sure what you are asking, maybe why no one has replied...meows wrote:I think I have a problem Houston, Is it just me or is there a problem with
garrison heros.. I garrison heros in enemy towns and now the game can't find my PLAYER_1 hero standing in front of his town once he captures it!
Is there something I need to do in the Map Properties?
Many thanks.
you are putting enemy AI garrisoned units in a town, and the player, PLAYER_1, attacks and captures the town killing the garrisoned AI hero, but the game cannot find the players hero afterwards? is that what you are asking?
After rereading my question i can see your point myythryyn, Ok i have 3 cities on the map two with garrisoned Heros and the Main Hero (PLAYER_1) standing in a clearing.. I tested the map and all went well.. Then i added the last 3 towns and garrisoned those heros and when I went to test the map I keep getting the error on start up NO Hero on the map! However if I garrison him (PLAYER_1) then the map plays.
What do I need to do to make the map play without having to Garrison (PLAYER_1)?
THanks all
If I understand what you said, you have 6 towns on your map.
5 of them get a garrisoned hero at the start of the game
and player 1 have a main hero somewhere on the map but none generated in town.
All you have to do go to "Map Properties" then in "Player properties" and set your things. For player 1, check the main town and choose the right one, don't check "generate hero in town" and choose the main hero.
For other players, choose a main town and check "generate hero in town".
Btw when you edit the properties of your hero on the map (press space after selecting it) in "settings" you must set it to player 1.
If you are talking about script, then its normal the game doesn't find the hero if he is in the garrison of a town as I said in my other post.
5 of them get a garrisoned hero at the start of the game
and player 1 have a main hero somewhere on the map but none generated in town.
All you have to do go to "Map Properties" then in "Player properties" and set your things. For player 1, check the main town and choose the right one, don't check "generate hero in town" and choose the main hero.
For other players, choose a main town and check "generate hero in town".
Btw when you edit the properties of your hero on the map (press space after selecting it) in "settings" you must set it to player 1.
If you are talking about script, then its normal the game doesn't find the hero if he is in the garrison of a town as I said in my other post.
Many thanks for the answers.. Yes it worked.!
I have a problem with this though,, and for the life of me I can't find the error.. pulling up the cheat box when the game starts yeilds me nothing..
can any one see what I missed?
here is the code, for that section.
IsInferno1Defeated = 0;
increment = 0;
.
.
.
function CreaturesSpawn()
if GetDate( DAY_OF_WEEK ) == 1 then
if (IsiIferno1Defeated == 0) then
--GenerateMonsters(monsterTypeID, countGroupsMin, countGroupsMax,
countInGroupMin, countInGroupMax)
if GetDifficulty() == DIFFICULTY_HEROIC then
increment = increment+1;
GenerateMonsters(CREATURE_SPRITE, 10, 15, 50*increment, 80*increment);
GenerateMonsters(CREATURE_WAR_DANCER, 5, 10, 30*increment, 50*increment);
GenerateMonsters(CREATURE_GRAND_ELF, 4, 8, 16*increment, 25*increment);
print("Inferno have spawned monsters. Difficulty is HEROIC");
else if GetDifficulty() == DIFFICULTY_HARD then
increment = increment+1;
GenerateMonsters(CREATURE_SPRITE, 8, 12, 40*increment, 60*increment);
GenerateMonsters(CREATURE_WAR_DANCER, 4, 8, 25*increment, 40*increment);
GenerateMonsters(CREATURE_WOOD_ELF, 3, 6, 14*increment, 22*increment);
print("Inferno have spawned monsters. Difficulty is HARD");
else if GetDifficulty() == DIFFICULTY_NORMAL then
GenerateMonsters(CREATURE_PIXIE, 8, 10, 30, 40);
GenerateMonsters(CREATURE_BLADE_JUGGLER, 3, 6, 15, 20);
GenerateMonsters(CREATURE_WOOD_ELF, 1, 2, 8, 10);
print("Inferno have spawned monsters. Difficulty is NORMAL");
else if GetDifficulty() == DIFFICULTY_EASY then
GenerateMonsters(CREATURE_PIXIE, 4, 8, 15, 25);
GenerateMonsters(CREATURE_BLADE_JUGGLER, 2, 4, 10, 14);
print("Inferno have spawned monsters. Difficulty is EASY");
end;
end;
end;
end;
end;
end;
end;
startThread(Day2);
startThread(HeamSurvive);
DifficultyDependencies();
startThread(EnemyGate);
startThread(AIPressingTownOnisac_Empire,"Pelt");
startThread(GiarReinforcements);
SetRegionBlocked("border3BlockAI",true,PLAYER_3);
SetRegionBlocked("Border4BlockAI",true,PLAYER_4);
SetRegionBlocked("gate1",true,PLAYER_3,PLAYER_4);
I have a problem with this though,, and for the life of me I can't find the error.. pulling up the cheat box when the game starts yeilds me nothing..
can any one see what I missed?
here is the code, for that section.
IsInferno1Defeated = 0;
increment = 0;
.
.
.
function CreaturesSpawn()
if GetDate( DAY_OF_WEEK ) == 1 then
if (IsiIferno1Defeated == 0) then
--GenerateMonsters(monsterTypeID, countGroupsMin, countGroupsMax,
countInGroupMin, countInGroupMax)
if GetDifficulty() == DIFFICULTY_HEROIC then
increment = increment+1;
GenerateMonsters(CREATURE_SPRITE, 10, 15, 50*increment, 80*increment);
GenerateMonsters(CREATURE_WAR_DANCER, 5, 10, 30*increment, 50*increment);
GenerateMonsters(CREATURE_GRAND_ELF, 4, 8, 16*increment, 25*increment);
print("Inferno have spawned monsters. Difficulty is HEROIC");
else if GetDifficulty() == DIFFICULTY_HARD then
increment = increment+1;
GenerateMonsters(CREATURE_SPRITE, 8, 12, 40*increment, 60*increment);
GenerateMonsters(CREATURE_WAR_DANCER, 4, 8, 25*increment, 40*increment);
GenerateMonsters(CREATURE_WOOD_ELF, 3, 6, 14*increment, 22*increment);
print("Inferno have spawned monsters. Difficulty is HARD");
else if GetDifficulty() == DIFFICULTY_NORMAL then
GenerateMonsters(CREATURE_PIXIE, 8, 10, 30, 40);
GenerateMonsters(CREATURE_BLADE_JUGGLER, 3, 6, 15, 20);
GenerateMonsters(CREATURE_WOOD_ELF, 1, 2, 8, 10);
print("Inferno have spawned monsters. Difficulty is NORMAL");
else if GetDifficulty() == DIFFICULTY_EASY then
GenerateMonsters(CREATURE_PIXIE, 4, 8, 15, 25);
GenerateMonsters(CREATURE_BLADE_JUGGLER, 2, 4, 10, 14);
print("Inferno have spawned monsters. Difficulty is EASY");
end;
end;
end;
end;
end;
end;
end;
startThread(Day2);
startThread(HeamSurvive);
DifficultyDependencies();
startThread(EnemyGate);
startThread(AIPressingTownOnisac_Empire,"Pelt");
startThread(GiarReinforcements);
SetRegionBlocked("border3BlockAI",true,PLAYER_3);
SetRegionBlocked("Border4BlockAI",true,PLAYER_4);
SetRegionBlocked("gate1",true,PLAYER_3,PLAYER_4);
Well few things...
First, you wrote IsiIferno1Defeated instead of IsInferno1Defeated.
Then, you don't have to make new if function all the time you can use elseif instead of else if, so that it doesn't need to start a new condition every time.
Here is the code i would use if i were you :
I didn't check if it was working but it should on first view.
First, you wrote IsiIferno1Defeated instead of IsInferno1Defeated.
Then, you don't have to make new if function all the time you can use elseif instead of else if, so that it doesn't need to start a new condition every time.
Here is the code i would use if i were you :
Code: Select all
IsInferno1Defeated = 0;
increment = 0;
function CreaturesSpawn()
while 1 do
if GetDate( DAY_OF_WEEK ) == 1 and (IsInferno1Defeated == 0) then
if GetDifficulty() == DIFFICULTY_HEROIC then
increment = increment+1;
GenerateMonsters(CREATURE_SPRITE, 10, 15, 50*increment, 80*increment);
GenerateMonsters(CREATURE_WAR_DANCER, 5, 10, 30*increment, 50*increment);
GenerateMonsters(CREATURE_GRAND_ELF, 4, 8, 16*increment, 25*increment);
print("Inferno have spawned monsters. Difficulty is HEROIC");
elseif GetDifficulty() == DIFFICULTY_HARD then
increment = increment+1;
GenerateMonsters(CREATURE_SPRITE, 8, 12, 40*increment, 60*increment);
GenerateMonsters(CREATURE_WAR_DANCER, 4, 8, 25*increment, 40*increment);
GenerateMonsters(CREATURE_WOOD_ELF, 3, 6, 14*increment, 22*increment);
print("Inferno have spawned monsters. Difficulty is HARD");
elseif GetDifficulty() == DIFFICULTY_NORMAL then
GenerateMonsters(CREATURE_PIXIE, 8, 10, 30, 40);
GenerateMonsters(CREATURE_BLADE_JUGGLER, 3, 6, 15, 20);
GenerateMonsters(CREATURE_WOOD_ELF, 1, 2, 8, 10);
print("Inferno have spawned monsters. Difficulty is NORMAL");
else
GenerateMonsters(CREATURE_PIXIE, 4, 8, 15, 25);
GenerateMonsters(CREATURE_BLADE_JUGGLER, 2, 4, 10, 14);
print("Inferno have spawned monsters. Difficulty is EASY");
end;
break;
else sleep(1)
end;
end;
end;
startThread(CreaturesSpawn);
Hi!
I started to create a single player map, but when I tried to test it, the "Start map" (or whatever it called, in my version it's hungarian) opcion remained grey. I had the map properties page in the game, but I just couldn't launch the map...
I don't know what the problem could be. If there's someone who's got some time, could you please take a look at it?
The first player's (the human player) main hero is Aleina, she's in the top left of the map. The second (computer) player's main hero is Godric (called Largo de Trallen), he's in the underworld. The goal for the first player would be to open a border guard on the bottom right of the map. (The border guard is there.) The player's haven't got a town, but I checked the option in the Map Properties Tree to make it not a problem.
I just cannot see what's wrong with it... : (
The map is available at here:
http://users.atw.hu/swdotf/princess.zip
Thanks a lot for the help!
I started to create a single player map, but when I tried to test it, the "Start map" (or whatever it called, in my version it's hungarian) opcion remained grey. I had the map properties page in the game, but I just couldn't launch the map...
I don't know what the problem could be. If there's someone who's got some time, could you please take a look at it?
The first player's (the human player) main hero is Aleina, she's in the top left of the map. The second (computer) player's main hero is Godric (called Largo de Trallen), he's in the underworld. The goal for the first player would be to open a border guard on the bottom right of the map. (The border guard is there.) The player's haven't got a town, but I checked the option in the Map Properties Tree to make it not a problem.
I just cannot see what's wrong with it... : (
The map is available at here:
http://users.atw.hu/swdotf/princess.zip
Thanks a lot for the help!
Sixy, did you check that the players are not allied? The editor used automatically turn "teams" active and make all players friends to each other. Peace Eternal!
If you are in game check that the numbers displayed on players flags are not all identical... Sorry, cannot check your map from the computer I am using now.
If you are in game check that the numbers displayed on players flags are not all identical... Sorry, cannot check your map from the computer I am using now.
Avatar image credit: N Lüdimois
I've just now noticed it. : ) Yepp, they were allies.
My only problem for now is that if I launch the map, the "Open border guard" objective is automatically completed. I'm not sure I used the right way to add this objective:
1) I choosed the kind: OBJECTIVE_KIND_OPEN_GUARD
2) At the target glance I choosed the target type ADV_TARGET_COORDS
3) I added the coords to the target coords part from the border guard's properties. (So the coords used there.)
4) I added the texts, but left the other parts unchanged.
My only problem for now is that if I launch the map, the "Open border guard" objective is automatically completed. I'm not sure I used the right way to add this objective:
1) I choosed the kind: OBJECTIVE_KIND_OPEN_GUARD
2) At the target glance I choosed the target type ADV_TARGET_COORDS
3) I added the coords to the target coords part from the border guard's properties. (So the coords used there.)
4) I added the texts, but left the other parts unchanged.
well here i am again
just when i thougth that mabye ive gotten the hang of scripting, the editor succeeds in confusing me again and its no doubt something really simple im overlooking.
im trying to use manual objectives
as a test, i have a manual objective named obj1.
it is set to initially visable - false
and initially active - false
then i have a region, region1. when the player enters the region, the objective is supposed to become active and visable.
here is the script i made
function setobjective ()
if GetCurrentPlayer () == PLAYER_1 then
SetObjectiveState (obj1, OBJECTIVE_ACTIVE);
SetObjectiveVisible (obj1, true);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "region1", nil);
end;
end;
Trigger (REGION_ENTER_AND_STOP_TRIGGER, "region1", "setobjective" );
but this does not work, the objective does appear in the list when the region is entered....any ideas why?
thxs for any help
just when i thougth that mabye ive gotten the hang of scripting, the editor succeeds in confusing me again and its no doubt something really simple im overlooking.
im trying to use manual objectives
as a test, i have a manual objective named obj1.
it is set to initially visable - false
and initially active - false
then i have a region, region1. when the player enters the region, the objective is supposed to become active and visable.
here is the script i made
function setobjective ()
if GetCurrentPlayer () == PLAYER_1 then
SetObjectiveState (obj1, OBJECTIVE_ACTIVE);
SetObjectiveVisible (obj1, true);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "region1", nil);
end;
end;
Trigger (REGION_ENTER_AND_STOP_TRIGGER, "region1", "setobjective" );
but this does not work, the objective does appear in the list when the region is entered....any ideas why?
thxs for any help
BLess you Najibarr, yes i read and read the doc's however in this instanceNajibarr wrote:This create 4 hostile (mood = 2) titans named "1" at (66,90,1) that will always fight (courage = 1) but you can get all this in the editor documentation
the creatureType had me all confused as I could not find anything that would reference this ID.
Thanks again!
thxs alavris, its quotes that were needed.alavris wrote:Try "obj1" instead of obj1. Twice.
.
now im having a problem in the next step im trying to do.
here is my script so far
SetObjectiveState ("obj1", OBJECTIVE_ACTIVE);
SetObjectiveVisible ("obj1", true);
function complete ()
if GetCurrentPlayer () == PLAYER_1 then
SetObjectiveState ("obj1", OBJECTIVE_COMPLETE);
SetObjectiveState ("obj2", OBJECTIVE_ACTIVE);
SetObjectiveVisible ("obj2", true);
DeployReserveHero("Straker", 138, 22, 1);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "region1", nil);
end;
end;
Trigger (REGION_ENTER_AND_STOP_TRIGGER, "region1", "complete" );
what is supposed to happen is that when the map starts, obj1 becomes active and visiable, which it does.
then when player1 enters region1, obj1 completes and obj2 then becomes visable then active and a hero is deployed.
but that does not happen. objective1 does not complete, obj2 does not become visable, and no deployment of hero.
any ideas what ive done wrong?
and another thing that is causing me problems, i had to reinstall my game, and lost my settings for having the console screen open to check for script errors.
all the instructions say is to add this string
bind show_console '`'
somewhere in the input.cfg file, but not exacly where in the file.
i have tried placing that string in a few places, but no luck, i cant open the console with the tilde key.
between what lines do i place bind show_console '`'??
As for your code hummm.. I am not that good.. however. In my opinion your adding too many commands to one function. ( I could be totally wrong though.) THis is code I use for a map that works and is simular to what you want to do.. pick it apart and edit to do what you want.myythryyn wrote:thxs alavris, its quotes that were needed.alavris wrote:Try "obj1" instead of obj1. Twice.
.
now im having a problem in the next step im trying to do.
here is my script so far
SetObjectiveState ("obj1", OBJECTIVE_ACTIVE);
SetObjectiveVisible ("obj1", true);
function complete ()
if GetCurrentPlayer () == PLAYER_1 then
SetObjectiveState ("obj1", OBJECTIVE_COMPLETE);
SetObjectiveState ("obj2", OBJECTIVE_ACTIVE);
SetObjectiveVisible ("obj2", true);
DeployReserveHero("Straker", 138, 22, 1);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "region1", nil);
end;
end;
Trigger (REGION_ENTER_AND_STOP_TRIGGER, "region1", "complete" );
what is supposed to happen is that when the map starts, obj1 becomes active and visiable, which it does.
then when player1 enters region1, obj1 completes and obj2 then becomes visable then active and a hero is deployed.
but that does not happen. objective1 does not complete, obj2 does not become visable, and no deployment of hero.
any ideas what ive done wrong?
function Objstat()
if name=='Gillion' then
sleep(2);
MessageBox("/Maps/SingleMissions/test7/Message_GilraenDefeated.txt");
SetObjectiveState( 'prim0', OBJECTIVE_COMPLETED );
ObjectiveExp("Agrael");
DeployReserveHero("Gillion", 115, 95, GROUND);
EnableHeroAI("Gillion",nil);
startThread(EnableGilraenAI,GetDate(DAY));
Trigger( PLAYER_REMOVE_HERO_TRIGGER , PLAYER_2, nil);
SetObjectiveState( 'prim2', OBJECTIVE_ACTIVE );
end
end
use this in your input.cfg fileall the instructions say is to add this string
bind show_console '`'
somewhere in the input.cfg file, but not exacly where in the file.
i have tried placing that string in a few places, but no luck, i cant open the console with the tilde key.
between what lines do i place bind show_console '`'??
// general
bind jd_button_0 'ESC'
bind jd_button_0 'ENTER'
bind jd_button_0 'NUM_ENTER'
bind jd_button_0 'E'
bind esc_pressed 'ESC'
bind enter_pressed 'ENTER'
bind enter_pressed 'NUM_ENTER'
bind show_console '`'
Code: Select all
I'm wondering how the SetAIPlayerAttractor works exactly... I have a line that says :
With "arkania" being the script name of a town...
But the AI player doesn't seem to care, he's just chasing after my heroes... Anyone else tried to toy with this ?
Code: Select all
SetAIPlayerAttractor("arkania",PLAYER_2,2);
But the AI player doesn't seem to care, he's just chasing after my heroes... Anyone else tried to toy with this ?
Who is online
Users browsing this forum: No registered users and 0 guests