need scipting help
-
- Leprechaun
- Posts: 8
- Joined: 09 Jul 2008
need scipting help
i am makeing new maps for the frist time it all was going well untill i went around to scirting im only usein a few basic things but it never seems to work heres my scipt and i tested the map and none of it seems to work can anyone help me
SetPlayerStartResources(1,15,15,5,5,5,5,15000);
SetPlayerStartResources(2, 10, 10, 5, 5, 5, 5, 10000 ) ;
EnableAIHeroHiring(2,"town1", false );
SetTownBuildingLimitLevel ("town1"10);
SetTownBuildingLimitLevel ("town2"12);
ChangeHeroStat( "Orrin",STAT_EXPERIENCE, 2000 );
SetPlayerStartResources(1,15,15,5,5,5,5,15000);
SetPlayerStartResources(2, 10, 10, 5, 5, 5, 5, 10000 ) ;
EnableAIHeroHiring(2,"town1", false );
SetTownBuildingLimitLevel ("town1"10);
SetTownBuildingLimitLevel ("town2"12);
ChangeHeroStat( "Orrin",STAT_EXPERIENCE, 2000 );
1st 2 lines are ok, but others contain errors. First of all, constants true and false are NOT defined. Use not nil and nil insted (true=not nil, false=nil). Second, read function descriptions more careful nad don't skip required parameters. Third, enable console and keep it opened while testing - it shows all errors (in red) and even provides line number.
-
- Leprechaun
- Posts: 8
- Joined: 09 Jul 2008
Download The Basics of Heroes V Scripting ver. 2.0 for H5, HOF, & ToTE from the CH Downloads page. It tells you how to do it.anoamas321 wrote:how do i enable console and keep it opened while testing
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
-
- Leprechaun
- Posts: 8
- Joined: 09 Jul 2008
I apologize if the instructions in the guide are not well written. I can't think of anything to add except to say that you must check your work. Even a trivial typing error or even a missing space will prevent the console from opening. You must follow the directions explicitly and make no errors.
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
-
- Leprechaun
- Posts: 8
- Joined: 09 Jul 2008
Well, pressing CTRL to see the coordinates is standard game behavior.anoamas321 wrote:yh i fink i got sometin wen i press ctrl it show me da co-ords under cusor but thats bout it wen i press ` notin happends,waht exacly does it look like
The Console looks like a second window that occupies the entire top one third of the game window. It will have several lines of mono-spaced text in it telling you various things about the activity in the game. You cannot miss seeing it.
Here are some additional words that may help you get the console to display:
Basically, you have to edit two files.
The first file is the autoexec_a2.cfg file in the Ubisoft installation directory. The exact location of this file varies according to the choices you made when installing the game. I used the defaults and this is the path on my computer:
Code: Select all
C:\Program Files\Ubisoft\Heroes of Might and Magic V - Tribes of the East\profiles\autoexec_a2.cfg
Code: Select all
setvar dev_console_password = schwinge-des-todes
Code: Select all
C:\Documents and Settings\Robert DeFord\My Documents\My Games\Heroes of Might and Magic V - Tribes of the East\Profiles
Code: Select all
bind show_console '`'
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
-
- Leprechaun
- Posts: 8
- Joined: 09 Jul 2008
Welcome to H5 scripting!anoamas321 wrote:yh i got the consol open but it just says scipt failed unknown error help what can i do
Read the scripting guide you downloaded, especially the section on troubleshooting. And, as Franzy says, read the function descriptions carefully and check all your work. If you still cannot find the error, try commenting out your script lines until the error goes away. When it does, the last line you commented out contains the error. Study it carefully, then rewrite it and try again.
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
Who is online
Users browsing this forum: Amazon [Bot] and 1 guest