Auto-translated
PlayObjectAnimation('griphon','happy',ONESHOT)--to prevent it from freezing.
For other monsters, you need to click on "..." and in the AnimSet field, select the arena animation for it using the same "...", instead of LOD.
New here? I'm Roha — want a quick tour?
PlayObjectAnimation('griphon','happy',ONESHOT)--to prevent it from freezing.
For other monsters, you need to click on "..." and in the AnimSet field, select the arena animation for it using the same "...", instead of LOD.
Ment, that's what I did, but he passed through without any problems, while I couldn't...
The script doesn't work:
if GetDifficulty() == DIFFICULTY_EASY then
AddObjectCreatures ( "townhero",78,5 );
AddObjectCreatures ( "townhero",142,7 );
GiveExp( "Ferigl",17500 );
end;
if GetDifficulty() == DIFFICULTY_NORMAL then
AddObjectCreatures ( "townhero",78,7 );
AddObjectCreatures ( "townhero",142,7 );
GiveExp ( "Ferigl",12200 );
end;
if GetDifficulty() == DIFFICULTY_HARD then
AddObjectCreatures ( "townhero",78,6 );
AddObjectCreatures ( "townhero",142,6 );
GiveExp( "Ferigl",10000 );
end;
if GetDifficulty() == DIFFICULTY_HEROIC then
AddObjectCreatures ( "townhero",78,4 );
AddObjectCreatures ( "townhero",82,2 );;
GiveExp( "Ferigl",6200 );
end;
Question: what is the error?
GiveExp() seems to be written incorrectly:
GiveExpToLevel() - and this function gives the amount of experience needed for the next level
P.S. It would be good to mention what the console displays.
The console actually throws errors for GiveExp, as well as for Get difficulty and Difficulty Easy, Difficulty Normal, etc.
Added 1 minute ago
GiveExp was taken from the manual. It worked when there were no other scripts.
Try using ChangeHeroStat and inputting the difficulty IDs as numbers.
if GetDifficulty () = 0 then
AddHeroCreatures ('Isabell', 2, 100);
AddHeroCreatures ('Isabell', 4, 50);
AddHeroCreatures ('Isabell', 6, 30);
print ('Generated army for hero Изабель: 100 Militia, 50 Archers, 30 Plate Mail, 10 Royal Griffins');
end;
if GetDifficulty () = 1 then
AddHeroCreatures ('Isabell', 2, 150);
AddHeroCreatures ('Isabell', 4, 100);
AddHeroCreatures ('Isabell', 6, 50);
AddHeroCreatures ('Isabell', 8, 10);
print ('Generated army for hero Изабель: 150 Militia, 100 Archers, 50 Plate Mail, 20 Royal Griffins');
end;
if GetDifficulty () = 2 then
AddHeroCreatures ('Isabell', 2, 200);
AddHeroCreatures ('Isabell', 4, 120);
AddHeroCreatures ('Isabell', 6, 70);
AddHeroCreatures ('Isabell', 8, 20);
print ('Generated army for hero Изабель: 200 Militia, 120 Archers, 70 Plate Mail, 30 Royal Griffins');
end;
if GetDifficulty () = 3 then
AddHeroCreatures ('Isabell', 2, 250);
AddHeroCreatures ('Isabell', 4, 150);
AddHeroCreatures ('Isabell', 6, 100);
AddHeroCreatures ('Isabell', 8, 40);
print ('Generated army for hero Изабель: 250 Militia, 150 Archers, 100 Plate Mail, 50 Royal Griffins');
end;The console is complaining:(Script) ERROR: 'then' expected;
last token read: `0' at line 10 has string 'DoString script'
Script failed, unknown error